1  // { dg-do compile }
       2  // { dg-options "-O2 -fno-thread-jumps -fdisable-tree-fre1 -fdump-tree-evrp" }
       3  
       4  void link_error ();
       5  void bar ();
       6  
       7  float
       8  foo (float x)
       9  {
      10    if (x != x)
      11      {
      12        // The true side of x != x implies NAN, so we should be able to
      13        // fold this.
      14        if (!__builtin_isnan (x))
      15  	link_error ();
      16      }
      17  }
      18  
      19  // { dg-final { scan-tree-dump-not "link_error" "evrp" } }