1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fno-trapping-math -fno-finite-math-only -fdump-tree-optimized" } */
5 extern void link_error ();
14 double nan
= __builtin_nan ("");
16 /* The SPU single-precision floating point format does not support NANs. */
17 float nanf
= __builtin_nanf ("");
19 long double nanl
= __builtin_nanl ("");
21 double pinf
= __builtin_inf ();
23 /* The SPU single-precision floating point format does not support Inf. */
24 float pinff
= __builtin_inff ();
26 long double pinfl
= __builtin_infl ();
28 if (__builtin_finite (pinf
))
31 if (__builtin_finitef (pinff
))
34 if (__builtin_finitel (pinfl
))
37 if (__builtin_finite (nan
))
40 if (__builtin_finitef (nanf
))
43 if (__builtin_finitel (nanl
))
46 if (!__builtin_finite (4.0))
48 if (!__builtin_finitef (4.0))
50 if (!__builtin_finitel (4.0))
55 /* Check that all instances of link_error were subject to DCE. */
56 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
57 /* { dg-final { cleanup-tree-dump "optimized" } } */