Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / builtins-45.c
blobd138b8112510e26adda02a5b46fd075f0bb328a1
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fno-trapping-math -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 double pinf = __builtin_inf ();
19 float pinff = __builtin_inff ();
20 long double pinfl = __builtin_infl ();
22 if (__builtin_finite (pinf))
23 link_error ();
24 if (__builtin_finitef (pinff))
25 link_error ();
26 if (__builtin_finitel (pinfl))
27 link_error ();
29 if (__builtin_finite (nan))
30 link_error ();
31 if (__builtin_finitef (nanf))
32 link_error ();
33 if (__builtin_finitel (nanl))
34 link_error ();
36 if (!__builtin_finite (4.0))
37 link_error ();
38 if (!__builtin_finitef (4.0))
39 link_error ();
40 if (!__builtin_finitel (4.0))
41 link_error ();
45 /* Check that all instances of link_error were subject to DCE. */
46 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
47 /* { dg-final { cleanup-tree-dump "optimized" } } */