2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr69615.c
blob43ecf6bd05d785daaa9271f13102fa039ca7ce21
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" } } */
9 extern void foo (void);
11 void
12 f1 (int x)
14 if (x >= 0 && x <= __INT_MAX__ - 1)
15 foo ();
18 void
19 f2 (int x, int y)
21 if (x >= 0 && y && x <= __INT_MAX__ - 1)
22 foo ();
25 void
26 f3 (int x)
28 if (x > -__INT_MAX__ - 1 && x <= 23)
29 foo ();
32 void
33 f4 (int x, int y)
35 if (x > -__INT_MAX__ - 1 && y && x <= 23)
36 foo ();