summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-31.c
blob: 9ea9268fe1dd7dd0ac708a883257c734850d7a43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-dse1-details" } */

void g();
void f(int n, char *p)
{
  *p = 0;
  if (n)
    {
      *p = 1;
      g();
    }
  *p = 2;
}

/* { dg-final { scan-tree-dump-times "Deleted dead store" 1 "dse1" } } */