https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107788
Bug ID: 107788
Summary: [13 Regression] ICE in wide_int_to_tree_1, at
tree.cc:1757
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
g++ 13.0.0 20221120 snapshot (g:a16a5460447eaaff0b4468064e4d7b1cc8fc42eb) ICEs
when compiling libstdc++-v3/testsuite/20_util/bind/placeholders.cc w/
-fanalyzer -fno-early-inlining:
% g++-13 -fanalyzer -fno-early-inlining -Ilibstdc++-v3/testsuite/util -c
libstdc++-v3/testsuite/20_util/bind/placeholders.cc
during IPA pass: analyzer
In file included from libstdc++-v3/testsuite/20_util/bind/placeholders.cc:22:
libstdc++-v3/testsuite/20_util/bind/placeholders.cc: In function 'void
test01()':
libstdc++-v3/testsuite/20_util/bind/placeholders.cc:31:20: internal compiler
error: in wide_int_to_tree_1, at tree.cc:1757
31 | VERIFY( std::bind(std::minus<int>(), _1, _2)(five, seven) == -2 );
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/opt/compiler-test-corpus/gcc-13-20221120/libstdc++-v3/testsuite/util/testsuite_hooks.h:64:12:
note: in definition of macro 'VERIFY'
64 | if (! (fn))
\
| ^~
0x88e5f6 wide_int_to_tree_1
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/tree.cc:1757
0x14c8dcf wide_int_to_tree(tree_node*, poly_int<1u,
generic_wide_int<wide_int_ref_storage<false, true> > > const&)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/tree.cc:1869
0x14c8dcf build_int_cst(tree_node*, poly_int<1u, long>)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/tree.cc:1509
0x15dfd17 ana::region_model_manager::get_or_create_int_cst(tree_node*,
poly_int<1u, long>)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model-manager.cc:236
0x15beae0 ana::region_model::update_for_int_cst_return(ana::call_details
const&, int, bool)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:1934
0x15fa781 on_bind
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/sm-fd.cc:1874
0x15fa781 ana::region_model::on_bind(ana::call_details const&, bool)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/sm-fd.cc:2284
0x15d6b76 ana::kf_bind::outcome_of_bind::update_model(ana::region_model*,
ana::exploded_edge const*, ana::region_model_context*) const
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model-impl-calls.cc:630
0x159821e ana::exploded_graph::process_node(ana::exploded_node*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:4170
0x1598d7a ana::exploded_graph::process_worklist()
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:3457
0x159b504 ana::impl_run_checkers(ana::logger*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:6110
0x159c506 ana::run_checkers()
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:6198
0x158ae08 execute
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/analyzer-pass.cc:87
I'll try to reduce the testcase later today.