gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-fre1" } */ |
| 3 | struct foo |
| 4 | { |
| 5 | int val; |
| 6 | } *fooptr; |
| 7 | struct bar |
| 8 | { |
| 9 | struct foo foo; |
| 10 | int val2; |
| 11 | } *barptr; |
| 12 | int |
| 13 | test () |
| 14 | { |
| 15 | struct foo foo = { 0 }; |
| 16 | barptr->val2 = 123; |
| 17 | *fooptr = foo; |
| 18 | return barptr->val2; |
| 19 | } |
| 20 | |
| 21 | /* { dg-final { scan-tree-dump-times "return 123" 1 "fre1"} } */ |