https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97660
Bug ID: 97660 Summary: [11 Regression] ICE: Segmentation fault in function_summary<clone_info*>::get(cgraph_node*) since r11-4587 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: ibuclaw at gdcproject dot org CC: marxin at gcc dot gnu.org Target Milestone: --- On FreeBSD 12.2, host compiler gcc 9.3.0. Segmentation fault occurs during stage1 when compiling libgcc. git bisect points at r11-4587 being the first bad commit. Backtrace: --- during IPA pass: inline ../../../libgcc/libgcov-merge.c: In function '__gcov_merge_topn': ../../../libgcc/libgcov-merge.c:118:11: internal compiler error: Segmentation fault 118 | gcov_topn_add_value (counters + GCOV_TOPN_MEM_COUNTERS * i, value, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 119 | count, 0, 0); | ~~~~~~~~~~~~ 0xe7c39f crash_signal ../../gcc/toplev.c:330 0xa3244a function_summary<clone_info*>::get(cgraph_node*) ../../gcc/symbol-summary.h:212 0xa3244a clone_info::get(cgraph_node*) ../../gcc/symtab-clones.h:70 0xa3244a cgraph_edge::redirect_call_stmt_to_callee(cgraph_edge*) ../../gcc/cgraph.c:1495 0xeff807 redirect_all_calls(copy_body_data*, basic_block_def*) ../../gcc/tree-inline.c:2963 0xf024da copy_cfg_body ../../gcc/tree-inline.c:3118 0xf024da copy_body ../../gcc/tree-inline.c:3294 0xf04e86 expand_call_inline ../../gcc/tree-inline.c:5084 0xf06489 gimple_expand_calls_inline ../../gcc/tree-inline.c:5274 0xf06489 optimize_inline_calls(tree_node*) ../../gcc/tree-inline.c:5447 0xc5842b inline_transform(cgraph_node*) ../../gcc/ipa-inline-transform.c:763 0xd9a62c execute_one_ipa_transform_pass ../../gcc/passes.c:2240 0xd9a62c execute_all_ipa_transforms(bool) ../../gcc/passes.c:2287 0xa39015 cgraph_node::expand() ../../gcc/cgraphunit.c:1822 0xa3a417 expand_all_functions ../../gcc/cgraphunit.c:1997 0xa3a417 symbol_table::compile() ../../gcc/cgraphunit.c:2361 0xa3d217 symbol_table::compile() ../../gcc/cgraphunit.c:2274 0xa3d217 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2542 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. gmake: *** [Makefile:921: _gcov_merge_topn.o] Error 1