aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-44.c
blob: aaec41d7bdf39fc24a08ce556eb4102bae7156f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do link } */
/* { dg-options "-O -fdump-tree-dse1-details" } */

extern void foo(void);
int a, b;
static int c;
int main()
{
  if (c)
    foo ();
  int *g = &c;
  int **h = &g;
  int ***h1 = &h;
  if (a)
    while (b)
      b = 0;
}

/* { dg-final { scan-tree-dump "Deleted dead store: g = &c;" "dse1" } } */