http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60869
Bug ID: 60869 Summary: ICE on throw after invalid definition of __cxa_throw Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: harald at gigawatt dot nl typedef void __cxa_throw(void *, void *, void (*) (void *)); void f() { throw 1; } gives unhandled expression in get_expr_operands(): <type_decl 0x7f9eadd508a0 __cxa_throw type <function_type 0x7f9eadd53d20 __cxa_throw type <void_type 0x7f9eadb9c000 void VOID align 8 symtab 0 alias set -1 canonical type 0x7f9eadb9c000 pointer_to_this <pointer_type 0x7f9eadb9c0a8>> QI size <integer_cst 0x7f9eadb8b280 constant 8> unit size <integer_cst 0x7f9eadb8b2a0 constant 1> align 8 symtab 0 alias set -1 canonical type 0x7f9eadd53c78 arg-types <tree_list 0x7f9eadd63050 value <pointer_type 0x7f9eadb9c0a8> chain <tree_list 0x7f9eadd63078 value <pointer_type 0x7f9eadb9c0a8> chain <tree_list 0x7f9eadd630a0 value <pointer_type 0x7f9eadbaa498> chain <tree_list 0x7f9eadb87b18 value <void_type 0x7f9eadb9c000 void>>>>> pointer_to_this <pointer_type 0x7f9eadd65498>> VOID file test2.cc line 1 col 14 align 1 context <translation_unit_decl 0x7f9eadb93170 D.1> result <function_type 0x7f9eadd53c78 type <void_type 0x7f9eadb9c000 void> QI size <integer_cst 0x7f9eadb8b280 8> unit size <integer_cst 0x7f9eadb8b2a0 1> align 8 symtab 0 alias set -1 canonical type 0x7f9eadd53c78 arg-types <tree_list 0x7f9eadd63050> pointer_to_this <pointer_type 0x7f9eadd65540>> chain <function_decl 0x7f9eadd4e600 __cxa_call_unexpected>> test2.cc: In function ‘void f()’: test2.cc:2:21: internal compiler error: in get_expr_operands, at tree-ssa-operands.c:902 void f() { throw 1; } ^ 0xcc445c get_expr_operands ../../gcc/gcc/tree-ssa-operands.c:902 0xcc4cd1 parse_ssa_operands ../../gcc/gcc/tree-ssa-operands.c:951 0xcc620a build_ssa_operands ../../gcc/gcc/tree-ssa-operands.c:966 0xcc620a update_stmt_operands(function*, gimple_statement_base*) ../../gcc/gcc/tree-ssa-operands.c:1103 0xbf75e8 update_stmt ../../gcc/gcc/gimple-ssa.h:144 0xbf75e8 mark_def_sites ../../gcc/gcc/tree-into-ssa.c:675 0xbf75e8 mark_def_dom_walker::before_dom_children(basic_block_def*) ../../gcc/gcc/tree-into-ssa.c:2253 0x1044937 dom_walker::walk(basic_block_def*) ../../gcc/gcc/domwalk.c:177 0xbf6191 rewrite_into_ssa ../../gcc/gcc/tree-into-ssa.c:2331 0xbf6191 execute ../../gcc/gcc/tree-into-ssa.c:2403 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. Sort of expected, this ICEs on every version of GCC I can test right now (release versions of 4.1.2 to 4.8.2, and 4.9 as of about a month ago)