This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/38587] [4.4 Regression] psim miscompiled #2
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jan 2009 05:00:16 -0000
- Subject: [Bug middle-end/38587] [4.4 Regression] psim miscompiled #2
- References: <bug-38587-296@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #21 from hjl dot tools at gmail dot com 2009-01-20 05:00 -------
(In reply to comment #20)
> The problem may something to do with
>
> setjmp
> ...
> while (1)
> {
> foo (); // foo calls longjmp and foo is inlined.
> }
>
The problem is
if (setjmp (buf))
{
/* Restore registers from stack. */
}
while (1)
{
bar (); /* Reuse stack slots used to restore registers after
longjmp. */
foo (); /* Call longjmp. */
}
IRA should avoid reusing stack slots used to restore registers after
longjmp.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38587