PR testsuite/86649
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr58404.C
blob9a30b1755afcb922f08b42af60ff606e75ba4020
1 // { dg-do compile }
2 // { dg-options "-O -fdump-tree-cddce1" }
4 struct S { int s; };
5 S a[1024];
7 void
8 foo ()
10   for (int i = 0; i < 1024; i++)
11     {
12       S &r = a[i];
13       r.s++;
14     }
17 // We should propagate the reference into both memory accesses
18 // during the first forwprop pass
19 // { dg-final { scan-tree-dump-times "= &a" 0 "cddce1" } }