Merge from mainline (154736:156693)
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.c-torture / execute / vla-dealloc-1.c
blob9eb95c1b4e698f5067b63e45206677efd7f586e1
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. */
4 #if (__SIZEOF_INT__ <= 2)
5 #define LIMIT 10000
6 #else
7 #define LIMIT 1000000
8 #endif
10 void *volatile p;
12 int
13 main (void)
15 int n = 0;
16 if (0)
18 lab:;
20 int x[n % 1000 + 1];
21 x[0] = 1;
22 x[n % 1000] = 2;
23 p = x;
24 n++;
25 if (n < LIMIT)
26 goto lab;
27 return 0;