1 /* VLAs should be deallocated on a jump to before their definition,
2    including a jump to a label in an inner scope.  PR 19771.  */
3 /* { dg-require-effective-target alloca } */
4 
5 #if (__SIZEOF_INT__ <= 2)
6 #define LIMIT 10000
7 #else
8 #define LIMIT 1000000
9 #endif
10 
11 void *volatile p;
12 
13 int
main(void)14 main (void)
15 {
16   int n = 0;
17   if (0)
18     {
19     lab:;
20     }
21   int x[n % 1000 + 1];
22   x[0] = 1;
23   x[n % 1000] = 2;
24   p = x;
25   n++;
26   if (n < LIMIT)
27     goto lab;
28   return 0;
29 }
30