blob: b82dc27f45224276abe94ad078559a0c0477e2e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-evrp" } */
extern long foo (void);
extern long bar (void);
long
test1 (long n)
{
n &= 7;
if (n == 4) {
if (n & 4)
return foo ();
else
return bar ();
}
return 0;
}
long
test2 (long n)
{
n &= 7;
if (n > 4) {
if (n & 4)
return foo ();
else
return bar ();
}
return 0;
}
long
test3 (long n)
{
n &= 7;
if (n >= 4) {
if (n & 4)
return foo ();
else
return bar ();
}
return 0;
}
/* { dg-final { scan-tree-dump-not "bar" "evrp" } } */
|