https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72828
Bug ID: 72828 Summary: ICE in clone_tree_partial when compiling with -fdebug-types-section Product: gcc Version: 6.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: ott at fb dot com Target Milestone: --- Created attachment 39067 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39067&action=edit Repro for GCC 6.1.0 Trying to compile HHVM with -fdebug-types-section, it fails with an ICE in clone_tree_partial. The attached repro was obtained with creduce. Note that while the original file ICEs with all the GCC versions I tested (4.9, 5.1, and 6.1), the attached repro only crashes with 6.1, probably the bug is very dependent on code generation decisions (note that it doesn't crash without --param=early-inlining-insns=200). > g++ debug_types_ice_6.cpp -c -o /dev/null -std=c++11 -fdebug-types-section > -O3 -g2 --param=early-inlining-insns=200 -w debug_types_ice_6.cpp:237:1: internal compiler error: in clone_tree_partial, at dwarf2out.c:7916 } ^ 0x7d2a20 clone_tree_partial ../../gcc/dwarf2out.c:7916 0x7d2b9f copy_decls_walk ../../gcc/dwarf2out.c:7981 0x7d2aef copy_decls_walk ../../gcc/dwarf2out.c:8021 0x7d2aef copy_decls_walk ../../gcc/dwarf2out.c:8021 0x7d2aef copy_decls_walk ../../gcc/dwarf2out.c:8021 0x7d2c74 copy_decls_walk ../../gcc/dwarf2out.c:8015 0x7d2aef copy_decls_walk ../../gcc/dwarf2out.c:8021 0x7d2aef copy_decls_walk ../../gcc/dwarf2out.c:8021 0x7dceee copy_decls_for_unworthy_types ../../gcc/dwarf2out.c:8035 0x7f759a dwarf2out_finish ../../gcc/dwarf2out.c:27406 > g++ --version g++ (GCC) 6.1.0