]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr96392.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr96392.c
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 mult0(int x)
16 {
17 return 0.0 * x;
18 }
19
20 double negate(int x)
21 {
22 return 0.0 - x;
23 }
24
25 double subtract(int x)
26 {
27 return (double)x - (double)x;
28 }
29
30 /* { dg-final { scan-tree-dump-not " \\+ " "optimized" } } */
31 /* { dg-final { scan-tree-dump-not " \\- " "optimized" } } */
32 /* { dg-final { scan-tree-dump-not " \\* " "optimized" } } */
33