Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / tree-ssa / pr22117.c
blob0955c4519fbacf53f1adcee92552ee8e4a3f0d8b
1 /* PR tree-optimization/22117
2 VRP used think that &p[q] is nonzero even though p and q are both
3 known to be zero after entering the first two "if" statements. */
5 /* { dg-do compile } */
6 /* { dg-options "-O2 -fdump-tree-vrp" } */
8 void
9 foo (int *p, int q)
11 if (p == 0)
13 if (q == 0)
15 int *r = &p[q];
16 if (r != 0)
17 link_error ();
22 /* { dg-final { scan-tree-dump-times "Folding predicate r_.* != 0B to 0" 1 "vrp" } } */
23 /* { dg-final { cleanup-tree-dump "vrp" } } */