Hi,
I'm pretty sure that's a separate bug, present with or without my
patches. The code for TOK_CONTINUE (and TOK_BREAK, for that matter)
needs to include a gen_vla_sp_restore, just as the code for TOK_GOTO
does. (I think the code for TOK_FOR also needs to look like the code
for a label to work with C9x initial declarations of VLAs, but that's
a bit of a corner case...)

Anyway, your bug doesn't need the goto at all. I'll commit a fix in a minute.

On Mon, Apr 27, 2015 at 2:58 PM, Sergey Korshunoff <[email protected]> wrote:
> Additional vla_sp_save() is not a solution.

Yes, it is, it just doesn't magically fix unrelated bugs :-)

> if we add '{' after if(0) then there is no a "boom" even w/o
> additional vla_sp_save().

Are you saying there's no segfault, or no "boom"? For me, the results
are as follows:

mob tcc, no { } block: segfaults
mob tcc, { } block: segfaults
1..3 tcc, no { } block: segfaults
1..3 tcc, { } block: works
1..4 tcc, no { } block: works
1..4 tcc, { } block: works

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to