summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/loadpre2.c
blob: 1ef048443980f1a1159499bb922df493672332b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */ 
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
int main(int *a, int argc)
{
  int i;
  int e;

  /* Should be able to hoist this out of the loop.  */
  for (i = 0; i < argc; i++)
    {
      e = *a;
    }
  return e;
}

/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre"} } */