https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98078
Bug ID: 98078 Summary: ICE in cgraph_add_edge_to_call_site_hash, at cgraph.c:698 since r6-1705-gd88511aec7338a93 Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: jason at redhat dot com, marxin at gcc dot gnu.org Target Milestone: --- Created attachment 49657 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49657&action=edit test-case Reduced from dhewm3 package: $ g++ [12].ii -O2 -flto 1.ii:71:8: warning: ‘void<unnamed class>::FindModel(char*)’ used but never defined 71 | void FindModel(char *); | ^~~~~~~~~ 2.ii:10:7: warning: type ‘struct idDeclFX’ violates the C++ One Definition Rule [-Wodr] 10 | class idDeclFX : idDecl { | ^ 1.ii:78:7: note: a type with the same name but different number of polymorphic bases is defined in another translation unit 78 | class idDeclFX { | ^ 2.ii:2:7: note: the extra base is defined here 2 | class idDecl { | ^ during IPA pass: inline 1.ii: In member function ‘ParseSingleFXAction.constprop’: 1.ii:165:24: internal compiler error: in cgraph_add_edge_to_call_site_hash, at cgraph.c:724 165 | ParseSingleFXAction(src, action); | ^ 0x6099ff cgraph_add_edge_to_call_site_hash /home/marxin/Programming/gcc/gcc/cgraph.c:724 0x60a7c9 cgraph_add_edge_to_call_site_hash /home/marxin/Programming/gcc/gcc/tree.h:3331 0x60a7c9 cgraph_edge::set_call_stmt(cgraph_edge*, gcall*, bool) /home/marxin/Programming/gcc/gcc/cgraph.c:855 0x87c0af cgraph_edge::set_call_stmt(cgraph_edge*, gcall*, bool) /home/marxin/Programming/gcc/gcc/cgraph.c:820 0x87c39a cgraph_update_edges_for_call_stmt(gimple*, tree_node*, gimple*) /home/marxin/Programming/gcc/gcc/cgraph.c:1710 0xd35c4c fold_marked_statements /home/marxin/Programming/gcc/gcc/tree-inline.c:5380 0xd476f7 tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) /home/marxin/Programming/gcc/gcc/tree-inline.c:6412 0x88aeb8 cgraph_node::materialize_clone() /home/marxin/Programming/gcc/gcc/cgraphclones.c:1131 0x879485 cgraph_node::get_untransformed_body() /home/marxin/Programming/gcc/gcc/cgraph.c:3899 0xd43e57 expand_call_inline /home/marxin/Programming/gcc/gcc/tree-inline.c:4842 0xd467f1 gimple_expand_calls_inline /home/marxin/Programming/gcc/gcc/tree-inline.c:5280 0xd467f1 optimize_inline_calls(tree_node*) /home/marxin/Programming/gcc/gcc/tree-inline.c:5453 0xaa32eb inline_transform(cgraph_node*) /home/marxin/Programming/gcc/gcc/ipa-inline-transform.c:790 0xbeaeef execute_one_ipa_transform_pass /home/marxin/Programming/gcc/gcc/passes.c:2287 0xbeaeef execute_all_ipa_transforms(bool) /home/marxin/Programming/gcc/gcc/passes.c:2334 0x8854ad cgraph_node::expand() /home/marxin/Programming/gcc/gcc/cgraphunit.c:1822 0x886a0f expand_all_functions /home/marxin/Programming/gcc/gcc/cgraphunit.c:1997 0x886a0f symbol_table::compile() /home/marxin/Programming/gcc/gcc/cgraphunit.c:2361 0x7d9e75 lto_main() /home/marxin/Programming/gcc/gcc/lto/lto.c:653 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. lto-wrapper: fatal error: g++ returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status