add clang
This commit is contained in:
parent
4715742aa8
commit
9a4b261179
890 changed files with 229323 additions and 20 deletions
31
05/tcc-final/tests/tests2/122_vla_reuse.c
Normal file
31
05/tcc-final/tests/tests2/122_vla_reuse.c
Normal file
|
@ -0,0 +1,31 @@
|
|||
#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: %d %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;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue