public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-102662-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             reply	other threads:[~2021-10-09 14:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 14:03 asolokha at gmx dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102662-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).