Debian Codegraph @

gcc/testsuite/gcc.dg/pr110755.c

raw
1 /* PR tree-optimization/110755 */
2 /* { dg-do run } */
3 /* { dg-require-effective-target fenv } */
4 /* { dg-require-effective-target hard_float } */
5 /* { dg-options "-O2 -frounding-math" } */
6
7 #include <fenv.h>
8
9 __attribute__((noipa)) float
10 foo (float x)
11 {
12 if (x > 0.0)
13 {
14 x += 0x1p+23;
15 x -= 0x1p+23;
16 x = __builtin_fabsf (x);
17 }
18 return x;
19 }
20
21 int
22 main ()
23 {
24 #ifdef FE_DOWNWARD
25 fesetround (FE_DOWNWARD);
26 if (__builtin_signbit (foo (0.5)))
27 __builtin_abort ();
28 #endif
29 }