1 /* { dg-do compile } */
2 /* { dg-require-effective-target inf } */
3 /* { dg-options "-O1 -fno-trapping-math -fno-finite-math-only -fdump-tree-optimized" } */
6 extern void link_error ();
15 double nan
= __builtin_nan ("");
16 float nanf
= __builtin_nanf ("");
17 long double nanl
= __builtin_nanl ("");
19 double pinf
= __builtin_inf ();
20 float pinff
= __builtin_inff ();
21 long double pinfl
= __builtin_infl ();
23 if (__builtin_finite (pinf
))
25 if (__builtin_finitef (pinff
))
27 if (__builtin_finitel (pinfl
))
30 if (__builtin_finite (nan
))
32 if (__builtin_finitef (nanf
))
34 if (__builtin_finitel (nanl
))
37 if (!__builtin_finite (4.0))
39 if (!__builtin_finitef (4.0))
41 if (!__builtin_finitel (4.0))
46 /* Check that all instances of link_error were subject to DCE. */
47 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */