1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fno-trapping-math -fdump-tree-optimized" } */
5 extern void link_error ();
14 double pinf
= __builtin_inf ();
15 float pinff
= __builtin_inff ();
16 long double pinfl
= __builtin_infl ();
18 if (__builtin_isinf (pinf
) != 1)
20 if (__builtin_isinf (pinff
) != 1)
22 if (__builtin_isinff (pinff
) != 1)
24 if (__builtin_isinf (pinfl
) != 1)
26 if (__builtin_isinfl (pinfl
) != 1)
29 if (__builtin_isinf (-pinf
) != -1)
31 if (__builtin_isinf (-pinff
) != -1)
33 if (__builtin_isinff (-pinff
) != -1)
35 if (__builtin_isinf (-pinfl
) != -1)
37 if (__builtin_isinfl (-pinfl
) != -1)
40 if (__builtin_isinf (4.0))
42 if (__builtin_isinf (4.0))
44 if (__builtin_isinff (4.0))
46 if (__builtin_isinf (4.0))
48 if (__builtin_isinfl (4.0))
53 /* Check that all instances of link_error were subject to DCE. */
54 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
55 /* { dg-final { cleanup-tree-dump "optimized" } } */