This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/38609] [4.4 Regression]: gcc.c-torture/execute/built-in-setjmp.c execute -O2 and above
- From: "hp at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Dec 2008 19:13:26 -0000
- Subject: [Bug middle-end/38609] [4.4 Regression]: gcc.c-torture/execute/built-in-setjmp.c execute -O2 and above
- References: <bug-38609-507@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from hp at gcc dot gnu dot org 2008-12-31 19:13 -------
Glancing at the assembly and simulator trace (no looking at rtl or tree dumps
yet), the value of "p" (sp after the first alloca) is somehow lost and after
the __builtin_longjmp we effectively strcmp (NULL, "test") which FWIW, doesn't
SEGV in the simulator, but nevertheless obviously doesn't match.
At the longjmp-receiver, "p" is retrieved for the strcmp call as "move.d
[$sp+8],$r10", i.e. $r10 = *((char *) $sp + 8), but that's bogus as nothing was
stored there; "move.d $sp,$r10" (just copying the stack-pointer) would have
been correct.
I'll look further. HNY.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38609