aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/pr46562-2.c
blob: 45bf5cf71957ebe16a78d586de6fe1e3dae2cec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O -fno-tree-ccp -fno-tree-forwprop -fdump-tree-fre1" } */

static const int a[4] = {};
int foo(void)
{
  int i = 1;
  const int *p = &a[i];
  return *p;
}

/* { dg-final { scan-tree-dump "= 0;" "fre1" } } */
/* { dg-final { cleanup-tree-dump "fre1" } } */