OSDN Git Service

* tree-scalar-evolution.c (follow_ssa_edge_in_rhs,
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / forwprop-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-forwprop" }  */
3
4 /* We should be able to optimize this to b->t[i] = 1 during
5    early optimizations.  */
6
7 struct a
8 {
9   int t[10];
10 };
11
12 void f(struct a * b, __SIZE_TYPE__ i)
13 {
14   int *c = b->t;
15   c[i] = 1;
16 }
17
18 /* { dg-final { scan-tree-dump "t\\\[i.*\\\] = 1;" "forwprop1" { xfail *-*-* } } } */
19 /* { dg-final { scan-tree-dump "t\\\[i.*\\\] = 1;" "forwprop2" } } */
20 /* { dg-final { cleanup-tree-dump "forwprop?" } } */
21
22