PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr17598.c
blobd27fdccd29876ed50dde1c259b084f35d1ed8423
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-gimple" } */
4 struct f
6 int i;
7 int j;
8 };
10 struct g
12 int i;
13 struct f j;
14 struct f *k;
17 int foo(struct f *x, struct f *y)
19 return &x->j == &y->j; /* x == y */
22 struct f y;
23 int bar(struct f *x)
25 return &x->j == &y.j; /* x == &y */
28 struct g yy;
29 int foobar(struct g *x)
31 return &x->j.i == &yy.j.i; /* x == &yy */
33 int foobar2(struct g *x)
35 return &x->k->i == &yy.k->i; /* x->k == yy.k */
38 /* { dg-final { scan-tree-dump-times "x == y" 1 "gimple" } } */
39 /* { dg-final { scan-tree-dump-times "x == &y" 2 "gimple" } } */
40 /* { dg-final { scan-tree-dump "x->k" "gimple" } } */
41 /* { dg-final { scan-tree-dump "yy.k" "gimple" } } */