summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr89045.c
blob: 2b5730d4888b64515a16cb718d37b6db2a878c2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* PR c/89045 */
/* { dg-do compile } */
/* { dg-require-effective-target alloca } */
/* { dg-options "" } */

int
foo (int x)
{
  int v[(int){ x }];
  v[0] = 0;
  int bar (int p[(int){ x }])
  {
    return p[0];
  }
  return bar (v);
}