PR testsuite/52641
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / forwprop-11.c
blob08d0864af55d200d24be5e6832b0d371d03eb339
1 /* { dg-do compile } */
2 /* { dg-require-effective-target int32plus } */
3 /* { dg-options "-O -fdump-tree-forwprop1" } */
5 int f(int *p, int n)
7 int (*a)[n] = (int (*)[n])p;
8 int *q = &(*a)[0];
9 return q[1];
12 int g(int *p, int n)
14 int (*a)[n] = (int (*)[n])p;
15 int *q = &(*a)[2];
16 return q[-1];
19 /* { dg-final { scan-tree-dump-times "= MEM\\\[\\\(int \\\*\\\)\[ap\]_.. \\\+ 4B\\\];" 2 "forwprop1" } } */
20 /* { dg-final { cleanup-tree-dump "forwprop1" } } */