Hi!
> It looks that
> + vla_sp_save();
> is enough to fix a problem
I don't understand a problem but
another version of the patch is:
--- tinycc.orig/tccgen.c 2015-04-25 06:55:48.000000000 +0300
+++ tinycc/tccgen.c 2015-04-25 10:11:07.000000000 +0300
@@ -5450,7 +5450,7 @@
int a;
/* save current stack pointer */
- if (vla_flags & VLA_NEED_NEW_FRAME) {
+ if (vla_flags & (VLA_NEED_NEW_FRAME | VLA_IN_SCOPE)) {
vla_sp_save();
vla_flags = VLA_IN_SCOPE;
vla_sp_loc = &vla_sp_loc_tmp;
I also try the following:
static void vla_sp_save(void) {
if (!(vla_flags & VLA_SP_LOC_SET)) {
*vla_sp_loc = (loc -= PTR_SIZE);
vla_flags |= VLA_SP_LOC_SET;
}
// if (!(vla_flags & VLA_SP_SAVED)) {
gen_vla_sp_save(*vla_sp_loc);
// vla_flags |= VLA_SP_SAVED;
// }
}
Why vla_sp_save() is protected by VLA_SP_SAVED ? How it works with a
multiple VLA's ?
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel