http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52787
Bug #: 52787 Summary: Segmentation fault on MinGW Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libitm AssignedTo: unassig...@gcc.gnu.org ReportedBy: i.nix...@gmail.com This code successfully compiled but on run crashes: // { dg-do run } extern "C" void abort (); int dothrow; int g; static void f1() { g++; if (dothrow) throw 1; } static void f2() { __transaction_atomic { f1(); } } int main() { dothrow = 0; f2(); dothrow = 1; try { f2(); } catch (...) { } if (g != 2) abort (); return 0; } ------------------------------------------------------------------------- Coompiler: $ g++ -v Using built-in specs. COLLECT_GCC=e:\mingw32\bin\g++.exe COLLECT_LTO_WRAPPER=e:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/4.7.0/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: ../../mingw-src/gcc-4.7.0/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --enable-targets=all --enable-multilib --prefix=/./mingw-x32 --with-sysroot=/./mingw-x32 --with-tune=generic --enable-languages=c,c++,lto,fortran --enable-libstdcxx-time=yes --with-host-libstdcxx='-static -lstdc++' --enable-shared --enable-static --enable-threads=posix --enable-libgomp --enable-lto --enable-graphite --enable-cloog-backend=isl --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-sjlj-exceptions --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-debug --disable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-gmp=/./mingw-libs-x32 --with-mpfr=/./mingw-libs-x32 --with-mpc=/./mingw-libs-x32 --with-ppl=/./mingw-libs-x32 --with-cloog=/./mingw-libs-x32 CFLAGS='-O3 -pipe -fomit-frame-pointer -momit-leaf-frame-pointer -I/./mingw-libs-x32/include' CXXFLAGS='-O3 -pipe -fomit-frame-pointer -momit-leaf-frame-pointer' CPPFLAGS= LDFLAGS='-pipe -s -L/./mingw-libs-x32/lib' Thread model: posix gcc version 4.7.0 ------------------------------------------------------------------------- Output log from gdb: Program received signal SIGSEGV, Segmentation fault. (anonymous namespace)::serialirr_dispatch::ITM_RU4 (this=0x81c0d8, ptr=0x1) at E:/msys/mingw-src/gcc-4.7.0/libitm/method-serial.cc:90 90 CREATE_DISPATCH_METHODS(virtual, ) -------------------------------------------------------------------------