comparison gcc/testsuite/gcc.dg/pr69615.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
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
12 f1 (int x)
13 {
14 if (x >= 0 && x <= __INT_MAX__ - 1)
15 foo ();
16 }
17
18 void
19 f2 (int x, int y)
20 {
21 if (x >= 0 && y && x <= __INT_MAX__ - 1)
22 foo ();
23 }
24
25 void
26 f3 (int x)
27 {
28 if (x > -__INT_MAX__ - 1 && x <= 23)
29 foo ();
30 }
31
32 void
33 f4 (int x, int y)
34 {
35 if (x > -__INT_MAX__ - 1 && y && x <= 23)
36 foo ();
37 }