PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-dse-16.c
bloba44991a616844b846ec48a4f9b650aef28d811e7
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dse1-details" } */
4 struct X { struct A { int a[2]; } b[10]; };
5 void foo (struct X *x, int i)
7 struct A a;
8 /* Confuse SRA here with using a variable index, otherwise it will mess
9 with the IL too much. */
10 a.a[i] = 3;
11 a.a[1] = 0;
12 /* The following store is dead. */
13 x->b[i].a[0] = 1;
14 x->b[i] = a;
17 /* { dg-final { scan-tree-dump "Deleted dead store" "dse1" } } */