<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinycc/tests/tests2/79_vla_continue.c, branch main</title>
<subtitle>Tiny C Compiler by Fabrice Bellard Git mirror of the final release by Bellard, discarding all changes after. The repository at https://repo.or.cz/tinycc.git has become untrustworthy. Also the tcc sources have become tainted with AI slop.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/'/>
<entry>
<title>tests/tests2/79_vla_continue.c: Fix off-by-one error.</title>
<updated>2015-11-13T21:49:29+00:00</updated>
<author>
<name>Edmund Grimley Evans</name>
<email>Edmund.Grimley.Evans@gmail.com</email>
</author>
<published>2015-11-13T21:49:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=3712c958f4ef31ce006edeab6c34875ea5ae08f8'/>
<id>3712c958f4ef31ce006edeab6c34875ea5ae08f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>VLA fix: save stack pointer right after modification</title>
<updated>2015-04-28T09:23:29+00:00</updated>
<author>
<name>Philip</name>
<email>pipcet@gmail.com</email>
</author>
<published>2015-04-28T09:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=44c330d647c3e1a17e7169f5aa5abb322166fdae'/>
<id>44c330d647c3e1a17e7169f5aa5abb322166fdae</id>
<content type='text'>
This patch disables the optimization of saving stack pointers lazily,
which didn't fully take into account that control flow might not reach
the stack-saving instructions. I've decided to leave in the extra calls
to vla_sp_save() in case anyone wants to restore this optimization.

Tests added and enabled.

There are two remaining bugs: VLA variables can be modified, and jumping
into the scope of a declared VLA will cause a segfault rather than a
compiler error. Both of these do not affect correct C code, but should
be fixed at some point. Once VLA variables have been made properly
immutable, we can share them with the saved stack pointer and save stack
and instructions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch disables the optimization of saving stack pointers lazily,
which didn't fully take into account that control flow might not reach
the stack-saving instructions. I've decided to leave in the extra calls
to vla_sp_save() in case anyone wants to restore this optimization.

Tests added and enabled.

There are two remaining bugs: VLA variables can be modified, and jumping
into the scope of a declared VLA will cause a segfault rather than a
compiler error. Both of these do not affect correct C code, but should
be fixed at some point. Once VLA variables have been made properly
immutable, we can share them with the saved stack pointer and save stack
and instructions.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix VLA/continue issue</title>
<updated>2015-04-27T16:42:27+00:00</updated>
<author>
<name>Philip</name>
<email>pipcet@gmail.com</email>
</author>
<published>2015-04-27T16:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.datenwolf.net/tinycc/commit/?id=d2dd6fdbfb491c87138eb8d7590fbb28f471ec8d'/>
<id>d2dd6fdbfb491c87138eb8d7590fbb28f471ec8d</id>
<content type='text'>
as reported in
http://lists.nongnu.org/archive/html/tinycc-devel/2015-04/msg00131.html. Note
that this is one of two separate VLA bugs:

 A. labels aren't reached by program execution, so the stack pointer is
 never saved
 B. continue doesn't restore the stack pointer as goto does

This fixes only B. I'm not sure whether the same issue applies to break
as well as continue.

Add a test case, but disable tests #78 and #79 for now as they're not
fully fixed until the issue described in
http://lists.nongnu.org/archive/html/tinycc-devel/2015-04/msg00110.html
is resolved.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as reported in
http://lists.nongnu.org/archive/html/tinycc-devel/2015-04/msg00131.html. Note
that this is one of two separate VLA bugs:

 A. labels aren't reached by program execution, so the stack pointer is
 never saved
 B. continue doesn't restore the stack pointer as goto does

This fixes only B. I'm not sure whether the same issue applies to break
as well as continue.

Add a test case, but disable tests #78 and #79 for now as they're not
fully fixed until the issue described in
http://lists.nongnu.org/archive/html/tinycc-devel/2015-04/msg00110.html
is resolved.
</pre>
</div>
</content>
</entry>
</feed>
