summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-23.c
blob: 6aeb06af9ee8425cc0b95c92e181fded0085806e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-stats" } */

struct { int x; int y; } global;
void foo(int n)
{
  int i;
  for ( i=0; i<n; i++)
    global.y += global.x*global.x;
}

/* { dg-final { scan-tree-dump "Eliminated: 3" "pre" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */