https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66214
jim at meyering dot net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jim at meyering dot net --- Comment #10 from jim at meyering dot net --- I have just encountered this problem and reduced a large input file to this: $ cat z.cpp struct A { typedef A B; int m; struct { V(B); } } $ g++ --version|head -1 g++ (GCC) 6.0.0 20150801 (experimental) That provokes the same ICE with this command: $ g++ -g -fpermissive z.cpp z.cpp:5:8: warning: ISO C++ forbids declaration of āVā with no type [-fpermissive] V(B); ^ z.cpp:4:10: error: TYPE_CANONICAL is not compatible struct { ^ <record_type 0x7f3208e9e1f8 A type_5 VOID align 8 symtab 148250704 alias set -1 canonical type 0x7f3208e9e1f8 fields <field_decl 0x7f3208e9b558 m type <integer_type 0x7f3208d3c7e0 int asm_written public SI size <integer_cst 0x7f3208d5a0a8 constant 32> unit size <integer_cst 0x7f3208d5a0c0 constant 4> align 32 symtab 148250944 alias set -1 canonical type 0x7f3208d3c7e0 precision 32 min <integer_cst 0x7f3208d5a060 -2147483648> max <integer_cst 0x7f3208d5a078 2147483647> pointer_to_this <pointer_type 0x7f3208d5e930>> decl_3 VOID file z.cpp line 3 col 7 align 1 offset_align 1 context <record_type 0x7f3208e9e1f8 A> chain <type_decl 0x7f3208e9b428 A type <record_type 0x7f3208e9e2a0 A> used nonlocal decl_4 VOID file z.cpp line 1 col 10 align 1 context <record_type 0x7f3208e9e1f8 A> result <record_type 0x7f3208e9e1f8 A> chain <type_decl 0x7f3208e9b4c0 B>>> context <translation_unit_decl 0x7f32107ca1e0 D.1> full-name "struct A" n_parents=0 use_template=0 interface-unknown chain <type_decl 0x7f3208e9b390 A>> <record_type 0x7f3208e9e348 B type_5 VOID align 8 symtab 0 alias set -1 canonical type 0x7f3208e9e1f8 fields <type_decl 0x7f3208e9b428 A type <record_type 0x7f3208e9e2a0 A type_5 VOID align 8 symtab 0 alias set -1 canonical type 0x7f3208e9e1f8 context <translation_unit_decl 0x7f32107ca1e0 D.1> full-name "struct A" n_parents=0 use_template=0 interface-unknown chain <type_decl 0x7f3208e9b390 A>> used nonlocal decl_4 VOID file z.cpp line 1 col 10 align 1 context <record_type 0x7f3208e9e1f8 A> result <record_type 0x7f3208e9e1f8 A type_5 VOID align 8 symtab 148250704 alias set -1 canonical type 0x7f3208e9e1f8 fields <field_decl 0x7f3208e9b558 m> context <translation_unit_decl 0x7f32107ca1e0 D.1> full-name "struct A" n_parents=0 use_template=0 interface-unknown chain <type_decl 0x7f3208e9b390 A>> chain <type_decl 0x7f3208e9b4c0 B type <record_type 0x7f3208e9e348 B> used nonlocal VOID file z.cpp line 2 col 13 align 1 context <record_type 0x7f3208e9e1f8 A> result <record_type 0x7f3208e9e1f8 A> chain <type_decl 0x7f3208e9b688 ._0>>> context <translation_unit_decl 0x7f32107ca1e0 D.1> full-name "A::B" n_parents=0 use_template=0 interface-unknown chain <type_decl 0x7f3208e9b390 A>> z.cpp:4:10: internal compiler error: verify_type failed 0xfe0959 verify_type(tree_node const*) ../../gcc/tree.c:13570 0x965ed4 gen_type_die_with_usage ../../gcc/dwarf2out.c:20685 0x967506 gen_type_die ../../gcc/dwarf2out.c:20879 0x96837c modified_type_die ../../gcc/dwarf2out.c:10810 0x968b84 add_type_attribute ../../gcc/dwarf2out.c:17486 0x968db7 gen_formal_parameter_die ../../gcc/dwarf2out.c:18100 0x9692c1 gen_formal_types_die ../../gcc/dwarf2out.c:18198 0x960ab7 gen_subprogram_die ../../gcc/dwarf2out.c:19083 0x96483b gen_decl_die ../../gcc/dwarf2out.c:21442 0x963b54 gen_member_die ../../gcc/dwarf2out.c:20377 0x963b54 gen_struct_or_union_type_die ../../gcc/dwarf2out.c:20461 0x963b54 gen_tagged_type_die ../../gcc/dwarf2out.c:20662 0x9669bd gen_type_die_with_usage ../../gcc/dwarf2out.c:20824 0x967506 gen_type_die ../../gcc/dwarf2out.c:20879 0x964bbe gen_decl_die ../../gcc/dwarf2out.c:21465 0x965794 dwarf2out_decl ../../gcc/dwarf2out.c:21915 0x965a6b dwarf2out_type_decl ../../gcc/dwarf2out.c:21625 0xc8446f rest_of_type_compilation(tree_node*, int) ../../gcc/passes.c:336 0x698ef3 finish_struct_1(tree_node*) ../../gcc/cp/class.c:6738 0x69a5a4 finish_struct(tree_node*, tree_node*) ../../gcc/cp/class.c:6904 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. [Exit 1]