aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr51491-2.c
blob: 79adcf6525ed3366c42afbc17adaeb6206d816a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-ccp1" } */

int g (int *);

int
f (int n)
{
  int tt = 0;
  int t = 4;
  {
    int a[t
          + (tt != 0 ? 6 : 0)
         ];
    tt = g (a);
    {
      int b[n];
      tt += g (b);
      if (n > 20)
	tt += 148 * g (b);
      tt += b[0];
    }
    tt += a[0];
  }
  {
    int a[4];
    tt += g (a);
    tt += a[0];
  }
  return tt;
}

/* { dg-final { scan-tree-dump-times "CLOBBER" 2 "ccp1"} } */
/* { dg-final { cleanup-tree-dump "ccp1" } } */