From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 36D4B385840A; Sat, 9 Oct 2021 14:03:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 36D4B385840A From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/102662] New: [12 Regression] ICE in validate, at analyzer/constraint-manager.cc:581 Date: Sat, 09 Oct 2021 14:03:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: asolokha at gmx dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Oct 2021 14:03:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102662 Bug ID: 102662 Summary: [12 Regression] ICE in validate, at analyzer/constraint-manager.cc:581 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-checking, 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++-12.0.0-alpha20211003 snapshot (g:d91056851c5c60f226e3192fb955d018b53eb6= 6f) ICEs when compiling the following piece of C code w/ -fanalyzer -fstrict-en= ums: enum OpCode { OP_MOVE, OP_LOADK, OP_LOADBOOL, OP_LOADNIL, OP_GETUPVAL, OP_SETUPVAL }; enum OpArg { OpArgN, OpArgU, OpArgR, OpArgK }; void symbexec_lastpc (enum OpCode symbexec_lastpc_op, enum OpArg luaP_opmodes) { switch (luaP_opmodes) { case OpArgN: case OpArgK: { switch (symbexec_lastpc_op) { case OP_LOADNIL: case OP_SETUPVAL: break; default: break; } } default: break; } } % g++-12.0.0 -fanalyzer -fstrict-enums -c c5smosbk.c during IPA pass: analyzer In function 'void symbexec_lastpc(OpCode, OpArg)': cc1plus: internal compiler error: in validate, at analyzer/constraint-manager.cc:581 0x91ca2d ana::bounded_ranges::validate() const =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/constraint-manager.cc:581 0x1f62159 ana::bounded_ranges_manager::get_or_create_union(vec const&) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/constraint-manager.cc:760 0x1f663ea ana::bounded_ranges_manager::make_case_label_ranges(gswitch const= *, tree_node*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/constraint-manager.cc:937 0x1f6650d ana::bounded_ranges_manager::create_ranges_for_switch(ana::switch_cfg_super= edge const&, gswitch const*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/constraint-manager.cc:889 0x1f666ce ana::bounded_ranges_manager::get_or_create_ranges_for_switch(ana::switch_cf= g_superedge const*, gswitch const*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/constraint-manager.cc:867 0x1539ec8 ana::region_model::apply_constraints_for_gswitch(ana::switch_cfg_superedge const&, gswitch const*, ana::region_model_context*, ana::rejected_constrain= t**) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/region-model.cc:3341 0x152cab1 ana::program_state::on_edge(ana::exploded_graph&, ana::exploded_node*, ana::superedge const*, ana::uncertainty_t*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/program-state.cc:1018 0x151a9aa ana::exploded_graph::process_node(ana::exploded_node*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/engine.cc:3575 0x151befa ana::exploded_graph::process_worklist() =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/engine.cc:2788 0x151e395 ana::impl_run_checkers(ana::logger*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/engine.cc:5364 0x151f240 ana::run_checkers() =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/engine.cc:5435 0x150efe8 execute =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gc= c/analyzer/analyzer-pass.cc:87=