arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / alias-access-path-9.c
blobfdc478922d5ce6decb931f6e51214ac22c81f197
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-fre1" } */
4 /* This testcase tests nonoverlapping_component_refs_since_match_p in presence
5 of non-trivial mem-refs. */
6 struct a {int a,b;};
7 struct b {struct a a[10];};
8 struct c {int c; struct b b;} c, *cptr;
10 void
11 set_a(struct a *a, int p)
13 a->a=p;
15 void
16 set_b(struct a *a, int p)
18 a->b=p;
20 int
21 get_a(struct a *a)
23 return a->a;
26 int
27 test(int i, int j)
29 struct b *bptr = &c.b;
30 set_a (&bptr->a[i], 123);
31 set_b (&bptr->a[j], 124);
32 return get_a (&bptr->a[i]);
35 int
36 test2(int i, int j)
38 struct b *bptr = &cptr->b;
39 set_a (&bptr->a[i], 125);
40 set_b (&bptr->a[j], 126);
41 return get_a (&bptr->a[i]);
43 /* { dg-final { scan-tree-dump-times "return 123" 1 "fre1"} } */
44 /* { dg-final { scan-tree-dump-times "return 125" 1 "fre1"} } */