http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60004
Bug ID: 60004 Summary: Conditional return within transaction causes ICE Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libitm Assignee: unassigned at gcc dot gnu.org Reporter: spear at cse dot lehigh.edu The following code produces an ICE: int a; int f() { __transaction_atomic { if (a == 5) return 1; } } compilation: gcc -std=c++11 -fgnu-tm test_if.cc -c error: test_if.cc: In function ‘int f()’: test_if.cc:4:5: internal compiler error: in lower_eh_constructs_2, at tree-eh.c:2105 int f() ^ 0xb96c26 lower_eh_constructs_2 ../../../src/gcc-libitm/gcc/tree-eh.c:2105 0xb96c26 lower_eh_constructs_1 ../../../src/gcc-libitm/gcc/tree-eh.c:2123 0xb979a4 lower_try_finally_switch ../../../src/gcc-libitm/gcc/tree-eh.c:1392 0xb979a4 lower_try_finally ../../../src/gcc-libitm/gcc/tree-eh.c:1722 0xb979a4 lower_eh_constructs_2 ../../../src/gcc-libitm/gcc/tree-eh.c:2065 0xb979a4 lower_eh_constructs_1 ../../../src/gcc-libitm/gcc/tree-eh.c:2123 0xb98e91 lower_eh_constructs ../../../src/gcc-libitm/gcc/tree-eh.c:2141 0xb98e91 execute ../../../src/gcc-libitm/gcc/tree-eh.c:2193 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Environment: gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/spear/gcc/install/gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../../src/gcc-libitm/configure --prefix=/home/spear/gcc/install/gcc --with-gmp=/home/spear/gcc/install/gmp/ --with-mpfr=/home/spear/gcc/install/mpfr/ --with-mpc=/home/spear/gcc/install/mpc/ --enable-languages=c,c++,lto --enable-multilib --enable-lto Thread model: posix gcc version 4.9.0 20140129 (experimental) (GCC)