https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103155
Bug ID: 103155 Summary: [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 51755 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51755&action=edit Partially reduced testcase g++-12.0.0-alpha20211107 snapshot (g:962ff7d2849e1fa6a1fe0535aa2dec5c2b9a32a6) ICEs when compiling the following line, extracted from libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_pop_mem.cc, w/ -std=c++20 -O3 -fopenacc -g --param ipa-cp-eval-threshold=0 -Ilibstdc++-v3/testsuite/util: #include <performance/priority_queue/mem_usage/pop_test.hpp> % g++-12.0.0 -std=c++20 -O3 -fopenacc -g --param ipa-cp-eval-threshold=0 -Ilibstdc++-v3/testsuite/util -c tvl87d85.cc during IPA pass: inline In function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pointer std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_create(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]': cc1plus: internal compiler error: in get_expr_operands, at tree-ssa-operands.c:813 0x839310 operands_scanner::get_expr_operands(tree_node**, int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:813 0x13198e9 operands_scanner::get_expr_operands(tree_node**, int) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:834 0x131a53f operands_scanner::parse_ssa_operands() /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:990 0x131b3eb operands_scanner::build_ssa_operands() /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:1005 0x131b4ff update_stmt_operands(function*, gimple*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:1147 0xe52a56 update_stmt_if_modified /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple-ssa.h:185 0xe52a56 update_stmt_if_modified /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple-ssa.h:182 0xe52a56 update_modified_stmt /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple-iterator.c:44 0xe52a56 gsi_insert_after(gimple_stmt_iterator*, gimple*, gsi_iterator_update) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple-iterator.c:544 0xe4932f gimple_seq_add_stmt(gimple**, gimple*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple.c:1315 0x11fe566 remap_gimple_stmt /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:2014 0x1203003 copy_bb /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:2054 0x1204622 copy_cfg_body /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:3088 0x1204622 copy_body /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:3341 0x1207693 tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:6369 0xcdf5ec cgraph_node::materialize_clone() /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/cgraphclones.c:1141 0xccd8a5 cgraph_node::get_untransformed_body() /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/cgraph.c:3907 0xcdf47f cgraph_node::materialize_clone() /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/cgraphclones.c:1111 0xccd8a5 cgraph_node::get_untransformed_body() /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/cgraph.c:3907 0xf28857 maybe_materialize_called_clones /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/ipa-inline-transform.c:720 Partially reduced contents of that file is in attachment.