This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/47490] __Unwind_SjLj_Unregister clobbers return value with i586-mingw32msvc-g++ 4.4.4 and -fstack-protector


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]