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

            Bug ID: 94011
           Summary: ICE in validate, at analyzer/region-model.cc:3727
           Product: gcc
           Version: 10.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: ---

g++-10.0.1-alpha20200301 snapshot (g:151bf47e78f5d919f6cc591d11cc1f6aff61078f)
ICEs when compiling the following testcase w/ -O1 -fanalyzer:

template <typename DV> DV
vu (DV j4)
{
  return [j4] () { return j4 () ? j4 : throw j4 (); } ();
}

void
foo ()
{
  auto n1 = [] { return nullptr; };

  vu (n1);
}

% g++-10.0.1 -O1 -fanalyzer -c ubufsom0.cc
during IPA pass: analyzer
ubufsom0.cc: In lambda function:
ubufsom0.cc:4:40: internal compiler error: in validate, at
analyzer/region-model.cc:3727
    4 |   return [j4] () { return j4 () ? j4 : throw j4 (); } ();
      |                                        ^~~~~~~~~~~
0x7dc6fd ana::region_model::validate() const
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200301/work/gcc-10-20200301/gcc/analyzer/region-model.cc:3727
0x135f8d7 ana::region_model::handle_unrecognized_call(gcall const*,
ana::region_model_context*)
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200301/work/gcc-10-20200301/gcc/analyzer/region-model.cc:4494
0x133cc30 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode
const*, gimple const*, ana::program_state*, ana::state_change*) const
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200301/work/gcc-10-20200301/gcc/analyzer/engine.cc:1107
0x133d3c1 ana::exploded_graph::process_node(ana::exploded_node*)
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200301/work/gcc-10-20200301/gcc/analyzer/engine.cc:2517
0x133d8aa ana::exploded_graph::process_worklist()
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200301/work/gcc-10-20200301/gcc/analyzer/engine.cc:2335
0x133dfd9 ana::impl_run_checkers(ana::logger*)
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200301/work/gcc-10-20200301/gcc/analyzer/engine.cc:3793
0x133ea7c ana::run_checkers()
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200301/work/gcc-10-20200301/gcc/analyzer/engine.cc:3850
0x1333908 execute
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200301/work/gcc-10-20200301/gcc/analyzer/analyzer-pass.cc:84

Reply via email to