aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr110875.c
blob: 4d6ecbca0c817d496a16053f0f5619879512f5bd (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
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp2" } */

void foo(void);
static int a, b;
static int *c = &a, *d;
static unsigned e;
static short f;
static unsigned g(unsigned char h, char i) { return h + i; }
int main() {
    d = &a;
    int *j = d;
    e = -27;
    for (; e > 18; e = g(e, 6)) {
        a = 0;
        for (; a != -3; a--) {
            if (0 != a ^ *j)
                for (; b; b++) f = -f;
            else if (*c) {
                foo();
                break;
            }
            if (!(((e) >= 235) && ((e) <= 4294967269))) {
                __builtin_unreachable();
            }
            b = 0;
        }
    }
}


/* { dg-final { scan-tree-dump-not "foo" "vrp2" } } */