aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr43513.c
blob: 78a037b5985f747355e779f7b7c143b68c2804e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-ccp2" } */

void bar (int *);
void foo (char *, int);

void
foo3 ()
{
  const int kIterations = 10;
  int results[kIterations];
  int i;
  bar (results);
  for (i = 0; i < kIterations; i++)
    foo ("%d ", results[i]);
}

/* { dg-final { scan-tree-dump-times "alloca" 0 "ccp2"} } */
/* { dg-final { cleanup-tree-dump "ccp2" } } */