Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/ieee/pr28634.c

raw
1 /* PR rtl-optimization/28634. On targets with delayed branches,
2 dbr_schedule could do the next iteration's addition in the
3 branch delay slot, then subtract the value again if the branch
4 wasn't taken. This can lead to rounding errors. */
5 void abort (void);
6 void exit (int);
7 double x = -0x1.0p53;
8 double y = 1;
9 int
10 main (void)
11 {
12 while (y > 0)
13 y += x;
14 if (y != x + 1)
15 abort ();
16 exit (0);
17 }