gcc/testsuite/gcc.dg/tree-ssa/forwprop-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-forwprop1" } */ |
| 3 | |
| 4 | /* We may not optimize this to b->t[i] = 1. */ |
| 5 | |
| 6 | struct a |
| 7 | { |
| 8 | int t[10]; |
| 9 | }; |
| 10 | |
| 11 | void f(struct a * b, __SIZE_TYPE__ i) |
| 12 | { |
| 13 | int *c = b->t; |
| 14 | c[i] = 1; |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-tree-dump-times "\\\[\[^\n\r\]*\\\] = 1;" 0 "forwprop1" } } */ |