blob: 34108c83828730d73fa56eb7578e2b5bdf37b9e9 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-dse1" } */
int a[2];
void foo(int i, int k, int j)
{
a[0] = i;
if (k)
a[0] = a[i] + k;
else
{
if (j)
a[1] = 1;
a[0] = a[i] + 3;
}
a[0] = 0;
}
/* The last stores to a[0] and a[1] remain. */
/* { dg-final { scan-tree-dump-times " = " 2 "dse1" } } */