gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-7.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O1 -fno-strict-aliasing -fdump-tree-optimized" } */ |
| 3 | |
| 4 | struct S |
| 5 | { |
| 6 | int i; |
| 7 | int j; |
| 8 | }; |
| 9 | struct U |
| 10 | { |
| 11 | struct S a[10]; |
| 12 | }; |
| 13 | int |
| 14 | foo (struct U *u, int n, int i, int j) |
| 15 | { |
| 16 | u->a[i].i = 123; |
| 17 | u->a[j].j = j; |
| 18 | return u->a[i].i; |
| 19 | } |
| 20 | /* { dg-final { scan-tree-dump-times "return 123" 1 "optimized"} } */ |