https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93137
Bug ID: 93137 Summary: [10 regression] ICE in refs_may_alias_p_2 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: s...@li-snyder.org Target Milestone: --- hi - With this version of gcc10 (svn rev 279832): gcc version 10.0.0 20200102 (experimental) (GCC) this source gives an ICE when compiled with -O: -- x.cc ----------------------------------------------------- #include <string> void foo (const std::string& s) { struct GCCLibSuffix { std::string LibSuffix; bool Active; } Suffixes[] = { {"/gcc/" + s, true} }; } ------------------------------------------------------------- $ g++ -std=c++17 -O -c x.cc during IPA pass: fnsummary x.cc: In function ‘void foo(const string&)’: x.cc:13:1: internal compiler error: Segmentation fault 13 | } | ^ 0xc1467f crash_signal /home/sss/gcc/gcc/gcc/toplev.c:328 0xcdb7c4 refs_may_alias_p_2 /home/sss/gcc/gcc/gcc/tree-ssa-alias.c:2190 0xcdc736 refs_may_alias_p_1(ao_ref*, ao_ref*, bool) /home/sss/gcc/gcc/gcc/tree-ssa-alias.c:2227 0xcdc736 stmt_may_clobber_ref_p_1(gimple*, ao_ref*, bool) /home/sss/gcc/gcc/gcc/tree-ssa-alias.c:3001 0xcdcdc0 walk_aliased_vdefs_1 /home/sss/gcc/gcc/gcc/tree-ssa-alias.c:3656 0xcdcf0f walk_aliased_vdefs(ao_ref*, tree_node*, bool (*)(ao_ref*, tree_node*, void*), void*, bitmap_head**, bool*, unsigned int) /home/sss/gcc/gcc/gcc/tree-ssa-alias.c:3679 0xa4cda2 parm_ref_data_pass_through_p /home/sss/gcc/gcc/gcc/ipa-prop.c:1052 0xa58c39 ipa_compute_jump_functions_for_edge /home/sss/gcc/gcc/gcc/ipa-prop.c:2237 0xa59cca ipa_compute_jump_functions_for_bb /home/sss/gcc/gcc/gcc/ipa-prop.c:2297 0xa59cca analysis_dom_walker::before_dom_children(basic_block_def*) /home/sss/gcc/gcc/gcc/ipa-prop.c:2823 0x137e977 dom_walker::walk(basic_block_def*) /home/sss/gcc/gcc/gcc/domwalk.c:309 0xa5495d ipa_analyze_node(cgraph_node*) /home/sss/gcc/gcc/gcc/ipa-prop.c:2893 0xa3c4df inline_indirect_intraprocedural_analysis /home/sss/gcc/gcc/gcc/ipa-fnsummary.c:4020 0xa3c4df inline_analyze_function(cgraph_node*) /home/sss/gcc/gcc/gcc/ipa-fnsummary.c:4040 0xa3c653 ipa_fn_summary_generate /home/sss/gcc/gcc/gcc/ipa-fnsummary.c:4084 0xb5848b execute_ipa_summary_passes(ipa_opt_pass_d*) /home/sss/gcc/gcc/gcc/passes.c:2189 0x86564d ipa_passes /home/sss/gcc/gcc/gcc/cgraphunit.c:2629 0x86564d symbol_table::compile() /home/sss/gcc/gcc/gcc/cgraphunit.c:2739 0x86712c symbol_table::compile() /home/sss/gcc/gcc/gcc/cgraphunit.c:2719 0x86712c symbol_table::finalize_compilation_unit() /home/sss/gcc/gcc/gcc/cgraphunit.c:2986 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. $ Compiles OK with gcc 9.2.1. The source from which this was reduced also built ok with gcc trunk 10.0.0 20191202.