gcc/testsuite/gcc.dg/tree-ssa/loadpre25.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */ |
| 3 | struct X { int i; }; |
| 4 | int foo(struct X *a, int argc) |
| 5 | { |
| 6 | int i; |
| 7 | int e; |
| 8 | |
| 9 | for (i = 0; i < argc; i++) |
| 10 | { |
| 11 | e = a->i; |
| 12 | a->i = 9; |
| 13 | } |
| 14 | return e; |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre" } } */ |