* tree-ssa-loop-manip.c (split_loop_exit_edge): Return the new block.
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-43.c
blob4941ffd8904dd6b9f8f640b7aaa7ee02a87efc81
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fno-trapping-math -fdump-tree-gimple -fdump-tree-optimized" } */
4 extern void f(int);
5 extern void link_error ();
7 extern float x;
8 extern double y;
9 extern long double z;
11 int
12 main ()
14 double nan = __builtin_nan ("");
15 float nanf = __builtin_nanf ("");
16 long double nanl = __builtin_nanl ("");
18 if (!__builtin_isnan (nan))
19 link_error ();
20 if (!__builtin_isnan (nanf))
21 link_error ();
22 if (!__builtin_isnanf (nanf))
23 link_error ();
24 if (!__builtin_isnan (nanl))
25 link_error ();
26 if (!__builtin_isnanl (nanl))
27 link_error ();
29 if (__builtin_isnan (4.0))
30 link_error ();
31 if (__builtin_isnan (4.0))
32 link_error ();
33 if (__builtin_isnanf (4.0))
34 link_error ();
35 if (__builtin_isnan (4.0))
36 link_error ();
37 if (__builtin_isnanl (4.0))
38 link_error ();
40 f (__builtin_isnan (x));
41 f (__builtin_isnan (y));
42 f (__builtin_isnanf (y));
43 f (__builtin_isnan (z));
44 f (__builtin_isnanl (z));
48 /* Check that all instances of __builtin_isnan were folded. */
49 /* { dg-final { scan-tree-dump-times "isnan" 0 "gimple" } } */
50 /* { dg-final { cleanup-tree-dump "gimple" } } */
52 /* Check that all instances of link_error were subject to DCE. */
53 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
54 /* { dg-final { cleanup-tree-dump "optimized" } } */