blob: bc84961a868f877faac557b58eb276b3a7159f2a (
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
|
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-ccp -fno-tree-dominator-opts -fdump-tree-vrp1" } */
int foo (int x, int b)
{
int cst;
if (b)
cst = -__INT_MAX__ - 1;
else
cst = -__INT_MAX__;
x = x | cst;
if (x >= 0)
return 12345;
return x;
}
int bar (int x, int b)
{
int cst;
if (b)
cst = __INT_MAX__;
else
cst = __INT_MAX__ - 1;
x = x & cst;
if (x < 0)
return 12345;
return x;
}
/* { dg-final { scan-tree-dump-not "12345" "vrp1" } } */
|