* config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-44.c
blob12676239b06669390bcfdd97f31f290436846f64
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fno-trapping-math -fno-finite-math-only -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 pinf = __builtin_inf ();
15 #ifndef __SPU__
16 /* The SPU single-precision floating point format does not support Inf. */
17 float pinff = __builtin_inff ();
18 #endif
19 long double pinfl = __builtin_infl ();
21 if (__builtin_isinf (pinf) != 1)
22 link_error ();
23 #ifndef __SPU__
24 if (__builtin_isinf (pinff) != 1)
25 link_error ();
26 if (__builtin_isinff (pinff) != 1)
27 link_error ();
28 #endif
29 if (__builtin_isinf (pinfl) != 1)
30 link_error ();
31 if (__builtin_isinfl (pinfl) != 1)
32 link_error ();
34 if (__builtin_isinf_sign (-pinf) != -1)
35 link_error ();
36 #ifndef __SPU__
37 if (__builtin_isinf_sign (-pinff) != -1)
38 link_error ();
39 #endif
40 if (__builtin_isinf_sign (-pinfl) != -1)
41 link_error ();
43 if (__builtin_isinf (4.0))
44 link_error ();
45 if (__builtin_isinf (4.0))
46 link_error ();
47 if (__builtin_isinff (4.0))
48 link_error ();
49 if (__builtin_isinf (4.0))
50 link_error ();
51 if (__builtin_isinfl (4.0))
52 link_error ();
56 /* Check that all instances of link_error were subject to DCE. */
57 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */