1 /* PR middle-end/65958 */ 2 3 /* { dg-do run } */ 4 /* { dg-options "-std=gnu99" } */ 5 /* { dg-require-effective-target alloca } */ 6 7 extern void abort (void); 8 foo(int n)9int foo (int n) 10 { 11 char *p, *q; 12 13 if (1) 14 { 15 char i[n]; 16 p = __builtin_alloca (8); 17 p[0] = 1; 18 } 19 20 q = __builtin_alloca (64); 21 __builtin_memset (q, 0, 64); 22 23 return !p[0]; 24 } 25 main(void)26int main (void) 27 { 28 if (foo (48) != 0) 29 abort (); 30 31 return 0; 32 } 33