rt_gccstream/gcc/testsuite/gcc.dg/vla-22.c

23 lines
258 B
C

/* { 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);
}