Debian Codegraph @

gcc/testsuite/gcc.dg/pr96392.c

raw
1 /* PR tree-optimization/96392 */
2 /* { dg-do compile } */
3 /* { dg-options "-O -fdump-tree-optimized" } */
4
5 double plus0(int x)
6 {
7 return x + 0.0;
8 }
9
10 double sub0(int x)
11 {
12 return x - 0.0;
13 }
14
15 double negate(int x)
16 {
17 return 0.0 - x;
18 }
19
20 double subtract(int x)
21 {
22 return (double)x - (double)x;
23 }
24
25 /* { dg-final { scan-tree-dump-not " \\+ " "optimized" } } */
26 /* { dg-final { scan-tree-dump-not " \\- " "optimized" } } */
27