http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49230
Kai Tietz <ktietz at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #10 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-06-29 20:20:21 UTC --- Please stop to reopen this bug. It isn't related to gcc at all. I just rebuild a gcc 4.7 (trunk) version for i686-w64-mingw32 and test passes as expected (with crash after trying to leave main function). This issue is related to mingw.org's header-set and handling of setjmp. As I mentioned before, this is caused by a missing (undocumented) argument for setjmp. You disassembly of this function shows that msvcrt's setjmp function tries to read this hidden argument and just by accident it is here the place of ebp. See on msdn the user-comment about setjmp.