PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / vla-dealloc-1.c
blob3b74b85a10e88aae86eb3a19a91f9a8f30611af8
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 } */
5 #if (__SIZEOF_INT__ <= 2)
6 #define LIMIT 10000
7 #else
8 #define LIMIT 1000000
9 #endif
11 void *volatile p;
13 int
14 main (void)
16 int n = 0;
17 if (0)
19 lab:;
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;