http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49372
--- Comment #1 from Johannes Schaub <schaub.johannes at googlemail dot com> 2011-06-11 13:46:46 UTC --- To elaborate on it, I have the following weird behavior: - GCC4.6 outputs nothing for the program (on my linux machine). That seems definitely wrong in any case. - GCC4.7 "4.7.0 20110517 (experimental)", using a mingw nightly build, generates an executable that crashes when running: [js@HOST2 cpp]$ ~/w64/bin/i686-w64-mingw32-g++ -std=c++0x -O1 -o a.exe main1.cpp [js@HOST2 cpp]$ wine ./a.exe Cwine: Unhandled page fault on read access to 0x00000000 at address (nil) (thread 0025), starting debugger... - The same GCC4.7 when using -O2 does not crash and print "CCDD": [js@HOST2 cpp]$ ~/w64/bin/i686-w64-mingw32-g++ -std=c++0x -O2 -o a.exe main1.cpp [js@HOST2 cpp]$ wine ./a.exe fixme:ntoskrnl:KeInitializeSpinLock stub: 0x5477a4 C C D D I don't know precisely whether this is a problem with wine or a temporary problem with that nightly build of GCC I was using. My apologies if GCC trunk works differently!