https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105287
Bug ID: 105287 Summary: [12 Regression] ICE in get_region_for_local, at analyzer/region.cc:874 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: --- Created attachment 52816 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52816&action=edit Testcase g++ 12.0.1 20220410 snapshot (g:54c5e064cc3dc3c9b3dff12b6d48dc3efd482b07) ICEs when compiling the attached testcase, reduced from gcc/testsuite/g++.dg/coroutines/torture/co-await-18-if-cond.C, w/ -std=c++20 -fanalyzer: % g++-12.0.1 -std=c++20 -fanalyzer -c refdaee6.C during IPA pass: analyzer refdaee6.C:35:73: internal compiler error: in get_region_for_local, at analyzer/region.cc:874 35 | coro1 my_coro() { co_await BoolAwaiter(true) && co_await IntAwaiter(1); } | ^ 0x89b2d6 ana::frame_region::get_region_for_local(ana::region_model_manager*, tree_node*, ana::region_model_context const*) const /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/region.cc:874 0x157c5e9 ana::region_model::get_lvalue(ana::path_var, ana::region_model_context*) const /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/region-model.cc:2138 0x157c5e9 ana::region_model::get_lvalue(tree_node*, ana::region_model_context*) const /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/region-model.cc:2149 0x15b8915 fully_overwrites_p /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/state-purge.cc:840 0x15b8915 ana::state_purge_per_decl::process_point_backwards(ana::function_point const&, auto_vec<ana::function_point, 0ul>*, hash_set<ana::function_point, false, default_hash_traits<ana::function_point> >*, ana::state_purge_map const&, ana::region_model const&) /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/state-purge.cc:928 0x15b8fae ana::state_purge_per_decl::process_worklists(ana::state_purge_map const&, ana::region_model_manager*) /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/state-purge.cc:742 0x15bb1f1 ana::state_purge_map::state_purge_map(ana::supergraph const&, ana::region_model_manager*, ana::logger*) /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/state-purge.cc:262 0x155f824 ana::impl_run_checkers(ana::logger*) /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/engine.cc:5728 0x156047e ana::run_checkers() /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/engine.cc:5851 0x154f108 execute /var/tmp/portage/sys-devel/gcc-12.0.1_p20220410/work/gcc-12-20220410/gcc/analyzer/analyzer-pass.cc:87