Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr22117.c
blob01cd33e958179e6690f3acf712727b7810feb176
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-vrp1" } */
8 void link_error (void);
10 void
11 foo (int *p, int q)
13 if (p == 0)
15 if (q == 0)
17 int *r = &p[q];
18 if (r != 0)
19 link_error ();
24 /* { dg-final { scan-tree-dump-times "link_error" 0 "vrp1" } } */