gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-fre1" } */ |
| 3 | struct a { |
| 4 | int val; |
| 5 | }; |
| 6 | struct b { |
| 7 | struct a a[10],a2[10]; |
| 8 | }; |
| 9 | struct c { |
| 10 | struct b b[10]; |
| 11 | } *cptr; |
| 12 | |
| 13 | struct d {struct c c;} *dptr; |
| 14 | |
| 15 | int |
| 16 | test (int i, int j, int k, int l) |
| 17 | { |
| 18 | cptr->b[i].a[j].val=123; |
| 19 | dptr->c.b[k].a2[l].val=2; |
| 20 | return cptr->b[i].a[j].val; |
| 21 | } |
| 22 | /* { dg-final { scan-tree-dump-times "return 123" 1 "fre1"} } */ |