tinycc/tests/tests2/122_vla_reuse.c
grischka 19e3e10e4b small scopes cleanup etc.
tccgen.c:
- just track local_stack for small scopes (can't declare variables)
- fix a vla problem with nested scopes
- move debug N_L/RBRAC into curly braced block

Also:
- tccpp.c: move 'label_...' functions to tccgen.c
- tccpp.c: let get_tok_str() say "<no name>" for anonymous symbols
- tcctest.c: let __pa_symbol() work for memory > 2GB
- 119_random_stuff.c: revert strtoll test (no reason to test libc)
- tccdefs.h/tcctest.c: enable bit fncs for _WIN32
- Makefile:
  - use i686-linux-gnu instead of i386-linux-gnu for cross-i386
  - update 'make help'
  - revert umplicit 'make all' with 'make install' (but print warning)
2023-03-12 20:40:50 +01:00

32 lines
500 B
C

#include <stdio.h>
int
main (void)
{
int n = 0;
int first=1;
int *p[101];
if (0) {
lab:;
}
int x[n % 100 + 1];
if (first == 0) {
if (&x[0] != p[n % 100 + 1]) {
printf ("ERROR: %p %p\n", &x[0], p[n % 100 + 1]);
return(1);
}
}
else {
p[n % 100 + 1] = &x[0];
first = n < 100;
}
x[0] = 1;
x[n % 100] = 2;
n++;
if (n < 100000)
goto lab;
printf ("OK\n");
return 0;
}