Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / tree-ssa / vrp02.c
blob61cb3087c86e37dd8dcbbc0cb6c82ac62f8e2348
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-vrp" } */
4 struct A
6 int a;
7 int b;
8 };
10 foo (struct A *p, struct A *q)
12 int x = p->a;
13 if (p == q)
14 return q->a;
16 /* We should fold this to 'if (1)' but the assertion for 'p == q'
17 was overwriting the assertion 'p != 0' from the first dereference
18 of 'p'. */
19 if (p)
20 return x + p->b;
23 /* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" } } */
24 /* { dg-final { cleanup-tree-dump "vrp" } } */