1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-forwprop1" } */
4 struct X
{ int a
[256]; };
6 int foo(struct X
*p
, __SIZE_TYPE__ i
)
9 int *q2
= (int *)((void *)q
+ i
*4 + 32);
13 int bar(struct X
*p
, int i
)
15 return *((int *)p
+ i
+ 8);
18 /* We should have propagated the base array address through the
19 address arithmetic into the memory access as an array access. */
21 /* { dg-final { scan-tree-dump-times "->a\\\[D\\\." 2 "forwprop1" { xfail *-*-* } } } */
22 /* { dg-final { cleanup-tree-dump "forwprop1" } } */