1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-optimized" } */
3
f(unsigned x)4 int f(unsigned x){
5 x += 123;
6 int y = x;
7 y -= 99;
8 return y;
9 }
g(int x)10 unsigned g(int x){
11 x += 123;
12 unsigned y = x;
13 y -= 99;
14 return y;
15 }
h(int x)16 int h(int x){
17 x += __INT_MAX__;
18 x += 1;
19 return x;
20 }
i(int x)21 int i(int x){
22 x += __INT_MAX__;
23 x += __INT_MAX__;
24 return x;
25 }
26
27 /* { dg-final { scan-tree-dump-times " \\+ 24;" 2 "optimized" } } */
28 /* { dg-final { scan-tree-dump-times "\\(unsigned int\\)" 2 "optimized" } } */
29 /* { dg-final { scan-tree-dump-not "2147483647" "optimized" } } */
30