https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63472
Bug ID: 63472 Summary: transaction_atomic within while loop causes ICE Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: spear at cse dot lehigh.edu Summary: The following code produces an ICE when compiled with "g++ -fgnu-tm bug.cc -c" int val; void test() { while (true) { __transaction_atomic { if (val == 42) return; } } } Error Message: bug.cc: In function ‘void test()’: bug.cc:12:1: internal compiler error: in duplicate_block, at cfghooks.c:1032 } ^ 0x84c987 duplicate_block(basic_block_def*, edge_def*, basic_block_def*) ../../source_git/gcc/cfghooks.c:1032 0x84cca5 copy_bbs(basic_block_def**, unsigned int, basic_block_def**, edge_def**, unsigned int, edge_def**, loop*, basic_block_def*, bool) ../../source_git/gcc/cfghooks.c:1312 0xbd6139 ipa_uninstrument_transaction ../../source_git/gcc/trans-mem.c:4093 0xbd6139 ipa_tm_scan_calls_transaction ../../source_git/gcc/trans-mem.c:4167 0xbd6139 ipa_tm_execute ../../source_git/gcc/trans-mem.c:5340 0xbd6139 execute ../../source_git/gcc/trans-mem.c:5578 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. GCC Information: gcc (GCC) 5.0.0 20141007 (experimental) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215970 138bc75d-0d04-0410-961f-82ee72b054a4