1 /* PR tree-optimization/69615 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-not " >= 0" "optimized" } } */
5 /* { dg-final { scan-tree-dump-not " < 0" "optimized" } } */
6 /* { dg-final { scan-tree-dump-not " <= 23" "optimized" } } */
7 /* { dg-final { scan-tree-dump-not " > 23" "optimized" } } */
8 
9 extern void foo (void);
10 
11 void
f1(int x)12 f1 (int x)
13 {
14   if (x >= 0 && x <= __INT_MAX__ - 1)
15     foo ();
16 }
17 
18 void
f2(int x,int y)19 f2 (int x, int y)
20 {
21   if (x >= 0 && y && x <= __INT_MAX__ - 1)
22     foo ();
23 }
24 
25 void
f3(int x)26 f3 (int x)
27 {
28   if (x > -__INT_MAX__ - 1 && x <= 23)
29     foo ();
30 }
31 
32 void
f4(int x,int y)33 f4 (int x, int y)
34 {
35   if (x > -__INT_MAX__ - 1 && y && x <= 23)
36     foo ();
37 }
38