http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52051
Bug #: 52051 Summary: [4.7 regression] invalid stack-cleanup occured with -O flag Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: jojel...@gmail.com Host: i686-pc-cygwin Target: i686-pc-mingw32 Build: i686-pc-cygwin Created attachment 26511 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26511 generated dump testcase is libjava/testsuite/libjava.lang/TestProxy.jar $ /tmp/gcc/host-i686-pc-cygwin/gcc/gcj -B/tmp/gcc/i686-pc-mingw32/libjava/ -B/tmp/gcc/host-i686-pc-cygwin/gcc/ -L/tmp/gcc/i686-pc-mingw32/winsup/mingw -L/tmp/gcc/i686-pc-mingw32/winsup/w32api/lib -isystem /tmp/gcc/winsup/mingw/include -isystem /tmp/gcc/winsup/w32api/include -B/usr/i686-pc-mingw32/bin/ -B/usr/i686-pc-mingw32/lib/ -isystem /usr/i686-pc-mingw32/include -isystem /usr/i686-pc-mingw32/sys-include --sysroot=/usr/i686-pc-mingw32/sys-root -g -fdump-tree-gimple -fdump-rtl-expand --main=TestProxy /tmp/gcc/libjava/testsuite/libjava.lang/TestProxy.jar -oTestProxy -save-temps -dP -fdump-tree-optimized -O3 -fdump-passes -fdump-rtl-all -v Reading specs from /tmp/gcc/host-i686-pc-cygwin/gcc/specs Reading specs from /tmp/gcc/i686-pc-mingw32/libjava/libgcj.spec rename spec startfile to startfileorig rename spec lib to liborig COLLECT_GCC=/tmp/gcc/host-i686-pc-cygwin/gcc/gcj COLLECT_LTO_WRAPPER=/tmp/gcc/host-i686-pc-cygwin/gcc/lto-wrapper.exe Target: i686-pc-mingw32 Configured with: ./configure -C --prefix=/usr --enable-win32-registry --enable-java-awt=qt --enable-threads=win32 --with-win32-nlsapi=unicode --enable-tls --disable-bootstrap --target=i686-pc-mingw32 --enable-shared --enable-load-library --enable-interpreter --disable-sjlj-exceptions --enable-gomp --with-ecj-jar=/tmp/gcc/org.eclipse.jdt.core_3.7.0.v_B35.jar --with-antlr-jar=/tmp/gcc/antlr-3.3-complete.jar --with-libiconv-prefix=/usr/i686-pc-mingw32 --with-x=no --enable-cloog-backend=isl --with-sysroot=/usr/i686-pc-mingw32/sys-root --with-build-sysroot=/usr/i686-pc-mingw32/sys-root LTLDFLAGS=-no-undefined lt_cv_deplibs_check_method=pass_all target_alias=i686-pc-mingw32 --enable-languages=c,c++,java,lto --no-create --no-recursion Thread model: win32 gcc version 4.7.0 20120128 (experimental) (GCC) confirmed following without -O flag : worked -O,-O1 : segmentation fault(due to invalid stack cleanup. needed one more pop.)