https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70641
Bug ID: 70641 Summary: ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu Target Milestone: --- The following code causes an ICE when compiled with the current GCC trunk at -O1 and above on x86_64-linux-gnu in both 32-bit and 64-bit modes. This is a regression from 5.3.x. $ g++-trunk -v Using built-in specs. COLLECT_GCC=g++-trunk COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/usr/local/gcc-trunk --disable-bootstrap Thread model: posix gcc version 6.0.0 20160412 (experimental) [trunk revision 234895] (GCC) $ $ g++-trunk -O0 -c small.cpp $ g++-5.3 -O1 -c small.cpp $ $ g++-trunk -O1 -c small.cpp small.cpp: In function ‘void foo()’: small.cpp:9:1: error: statement marked for throw, but doesn’t } ^ # .MEM_2 = VDEF <.MEM_1(D)> foo (); small.cpp:9:1: internal compiler error: verify_gimple failed 0xd9bd4f verify_gimple_in_cfg(function*, bool) ../../gcc-source-trunk/gcc/tree-cfg.c:5125 0xc8a392 execute_function_todo ../../gcc-source-trunk/gcc/passes.c:1958 0xc8ac7b execute_todo ../../gcc-source-trunk/gcc/passes.c:2010 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. $ ----------------------------- void foo () { try { foo (); } catch ( ... ) { __builtin_abort (); } }