Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / tree-ssa / pr21294.c
blobdc90dbde3aa1890f218821da582ad9692a14d361
1 /* PR tree-optimization/21294
2 VRP did not notice that an address of the form &p->i is nonnull
3 when p is known to be nonnull. In this testcase, noticing that
4 allows us to eliminate the second "if" statement. */
6 /* { dg-do compile } */
7 /* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
9 struct f {
10 int i;
13 int
14 foo (struct f *p)
16 if (p != 0)
17 if (&p->i != 0)
18 return 123;
19 return 0;
22 /* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
23 /* { dg-final { cleanup-tree-dump "vrp" } } */