Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-pre-8.c
blob64bf24fe6573c2daf15ef86a3200b05a03682bbf
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-fre1-stats" } */
3 struct s {
4 int *n;
5 };
7 int
8 foo (__SIZE_TYPE__ i, struct s *array)
10 int *p = array[i].n;
11 if (p)
13 int *q = array[i].n;
14 if (p != q)
15 return 1;
17 return 0;
19 /* We should eliminate two address calculations, and one load. */
20 /* We also elimiate the PHI node feeding the return because the case
21 returning 1 is unreachable. */
22 /* We used to eliminate a cast but that was before POINTER_PLUS_EXPR
23 was added. */
24 /* { dg-final { scan-tree-dump-times "Eliminated: 4" 1 "fre1"} } */