https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101503
Bug ID: 101503 Summary: [12 Regression] ICE in involves_p, at analyzer/svalue.cc:557 Product: gcc Version: 12.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: --- gcc-12.0.0-alpha20210718 snapshot (g:6ae8aac19cdbdbd96d90f86e4d8505fe121bdf06) ICEs when compiling the following testcase w/ -fanalyzer --param analyzer-max-svalue-depth=0: int val; int fn (void) { val = fn (); return 0; } % gcc-12.0.0 -fanalyzer --param analyzer-max-svalue-depth=0 -c nllhdqtp.c during IPA pass: analyzer nllhdqtp.c: In function 'fn': nllhdqtp.c:6:9: internal compiler error: in involves_p, at analyzer/svalue.cc:557 6 | val = fn (); | ^~~~~ 0x76e65b ana::svalue::involves_p(ana::svalue const*) const /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/svalue.cc:557 0x124227e ana::binding_cluster::purge_state_involving(ana::svalue const*, ana::region_model_manager*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/store.cc:1337 0x1244aaf ana::store::purge_state_involving(ana::svalue const*, ana::region_model_manager*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/store.cc:2497 0x1215ee8 ana::region_model::purge_state_involving(ana::svalue const*, ana::region_model_context*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/region-model.cc:1307 0x12160d0 ana::region_model::on_call_pre(gcall const*, ana::region_model_context*, bool*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/region-model.cc:1074 0x1218e63 ana::region_model::on_stmt_pre(gimple const*, bool*, bool*, ana::region_model_context*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/region-model.cc:1027 0x11e97bd ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:1223 0x11ebd52 ana::exploded_graph::process_node(ana::exploded_node*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:3098 0x11ec8ba ana::exploded_graph::process_worklist() /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:2684 0x11eed15 ana::impl_run_checkers(ana::logger*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:4972 0x11efbb0 ana::run_checkers() /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:5043 0x11e0c78 execute /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/analyzer-pass.cc:87