This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47490] __Unwind_SjLj_Unregister clobbers return value with i586-mingw32msvc-g++ 4.4.4 and -fstack-protector
- From: "mikpe at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 30 Jan 2011 01:23:54 +0000
- Subject: [Bug c++/47490] __Unwind_SjLj_Unregister clobbers return value with i586-mingw32msvc-g++ 4.4.4 and -fstack-protector
- Auto-submitted: auto-generated
- References: <bug-47490-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47490
--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> 2011-01-30 01:23:33 UTC ---
Fixed on trunk for 4.5 by r146570:
Author: uweigand
Date: Wed Apr 22 11:31:56 2009
New Revision: 146570
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146570
Log:
* function.c (expand_function_end): Do not emit a jump to the "naked"
return label for fall-through returns.
* except.c (sjlj_emit_function_exit): Always place the call to the
unregister function at the location installed by expand_function_end.
This seems to have been intended to fix SJLJ miscompilation on SPU, see the
thread starting <http://gcc.gnu.org/ml/gcc-patches/2009-04/msg01265.html>.
Backporting this change to 4.4.5 solves the test case failure there too.