Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/ieee/pr108540-2.c

raw
1 /* PR tree-optimization/108540 */
2
3 __attribute__((noipa)) int
4 foo (int x, double d)
5 {
6 if (x == 42)
7 d = -0.0;
8 if (d == 0.0)
9 return 42;
10 return 12;
11 }
12
13 int
14 main ()
15 {
16 if (foo (42, 5.0) != 42
17 || foo (42, 0.0) != 42
18 || foo (42, -0.0) != 42
19 || foo (10, 5.0) != 12
20 || foo (10, 0.0) != 42
21 || foo (10, -0.0) != 42)
22 __builtin_abort ();
23 }