aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr94851-3.c
blob: 0f953970b00bce4efc2b025db529afdb628128c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-additional-options "-O1" } */

struct List {
    struct List *next;
};

void foo(struct List *p, struct List *q)
{
    while (p && p != q){
        p = p->next;
    }
}

int main()
{
    struct List x = {0};
    foo(0, &x);
    return 0;
}