Hi!
I suugest the following patch for the case 4:
make an extra call to the vla_sp_save() in decl_initializer() at the
start insteed of doing this after gen_vla_alloc().
@@ -5450,6 +5451,9 @@
int a;
/* save current stack pointer */
+ if (vla_flags & VLA_IN_SCOPE)
+ vla_sp_save();
+
if (vla_flags & VLA_NEED_NEW_FRAME) {
vla_sp_save();
vla_flags = VLA_IN_SCOPE;
We have the same code in the tccgen.c already:
/* label case */
if (vla_flags & VLA_IN_SCOPE) {
/* save/restore stack pointer across label
this is a no-op when combined with the load immediately
after the label unless we arrive via goto */
vla_sp_save();
}
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel