* gcc.dg/stack-check-5.c: Skip with -fstack-protector.
[official-gcc.git] / gcc / testsuite / gcc.dg / vla-24.c
blob8b7230584b9abac239b0aa1f698844381c6e1b84
1 /* PR middle-end/65958 */
3 /* { dg-do run } */
4 /* { dg-options "-std=gnu99" } */
5 /* { dg-require-effective-target alloca } */
7 extern void abort (void);
9 int foo (int n)
11 char *p, *q;
13 if (1)
15 char i[n];
16 p = __builtin_alloca (8);
17 p[0] = 1;
20 q = __builtin_alloca (64);
21 __builtin_memset (q, 0, 64);
23 return !p[0];
26 int main (void)
28 if (foo (48) != 0)
29 abort ();
31 return 0;