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: "vmakarov at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2009 03:15:23 -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 #34 from vmakarov at redhat dot com 2009-01-21 03:15 -------
C standard guarantees that automatic variable only with volatile will be
restored after longjmp. Gcc puts volatiles on stack and don't use pseudos for
them. So they will be never shared on stack.
I think the code (its expected behavior) does not conform with the standard.
Unfortunately there are a lot of code which does not conform with the standard.
So I think we should provide the same functionality. It can be done by
prohibiting stack slot sharing in IRA if there are setjmps in the function.
I'll make a patch and send it for a review after some testing most probably
tomorrow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38587