public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/102662] New: [12 Regression] ICE in validate, at analyzer/constraint-manager.cc:581
@ 2021-10-09 14:03 asolokha at gmx dot com
  2021-10-09 18:09 ` [Bug analyzer/102662] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2021-10-09 14:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102662

            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:d91056851c5c60f226e3192fb955d018b53eb66f)
ICEs when compiling the following piece of C code w/ -fanalyzer -fstrict-enums:

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
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/constraint-manager.cc:581
0x1f62159
ana::bounded_ranges_manager::get_or_create_union(vec<ana::bounded_ranges
const*, va_heap, vl_ptr> const&)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/constraint-manager.cc:760
0x1f663ea ana::bounded_ranges_manager::make_case_label_ranges(gswitch const*,
tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/constraint-manager.cc:937
0x1f6650d
ana::bounded_ranges_manager::create_ranges_for_switch(ana::switch_cfg_superedge
const&, gswitch const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/constraint-manager.cc:889
0x1f666ce
ana::bounded_ranges_manager::get_or_create_ranges_for_switch(ana::switch_cfg_superedge
const*, gswitch const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/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_constraint**)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/region-model.cc:3341
0x152cab1 ana::program_state::on_edge(ana::exploded_graph&,
ana::exploded_node*, ana::superedge const*, ana::uncertainty_t*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/program-state.cc:1018
0x151a9aa ana::exploded_graph::process_node(ana::exploded_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/engine.cc:3575
0x151befa ana::exploded_graph::process_worklist()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/engine.cc:2788
0x151e395 ana::impl_run_checkers(ana::logger*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/engine.cc:5364
0x151f240 ana::run_checkers()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/engine.cc:5435
0x150efe8 execute
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211003/work/gcc-12-20211003/gcc/analyzer/analyzer-pass.cc:87

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-16 15:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-09 14:03 [Bug analyzer/102662] New: [12 Regression] ICE in validate, at analyzer/constraint-manager.cc:581 asolokha at gmx dot com
2021-10-09 18:09 ` [Bug analyzer/102662] " pinskia at gcc dot gnu.org
2021-10-11 10:42 ` [Bug analyzer/102662] [12 Regression] ICE in validate, at analyzer/constraint-manager.cc:581 since r12-3101-g8ca7fa84a3af355c marxin at gcc dot gnu.org
2021-11-15 20:51 ` dmalcolm at gcc dot gnu.org
2021-11-16 15:24 ` cvs-commit at gcc dot gnu.org
2021-11-16 15:26 ` dmalcolm at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).