aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/sccp-3.c
blob: b8c67427f16ea68be603f9665fdc9703f4e29908 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR/113080 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

int a,b,n;
int w;
void fun1(int t)
{
  for(int i=0;i<100;i++)
    {
      a+=w;
      b-=w;
      t+=a+b;
    }
  n=t;
}

/* We should apply final value replacement to all reductions and
   elide the loop.  */
/* { dg-final { scan-tree-dump-times "<bb" 1 "optimized" } } */