PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / vla-22.c
blob8025bae8f6f34b7cacbcd184b582aed737f0b621
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-require-effective-target alloca } */
5 extern void bar (int *);
7 static inline __attribute__((always_inline))
8 int
9 foo (int i)
11 struct S {
12 int ar[1][i];
13 } s;
15 s.ar[0][0] = 0;
16 bar (&s.ar[0][0]);
19 void
20 baz (int i)
22 foo (i + 2);