aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/vla-22.c
blob: f924650af03ec1caa647cbf6c725664d92fcc4ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2" } */

extern void bar (int *);

static inline __attribute__((always_inline))
int
foo (int i)
{
  struct S {
    int ar[1][i];
  } s;

  s.ar[0][0] = 0;
  bar (&s.ar[0][0]);
}

void
baz (int i)
{
  foo (i + 2);
}