Bug 94011 - ICE in validate, at analyzer/region-model.cc:3727
Summary: ICE in validate, at analyzer/region-model.cc:3727
Alias: None
Product: gcc
Classification: Unclassified
Component: analyzer (show other bugs)
Version: 10.0
: P3 normal
Target Milestone: ---
Assignee: David Malcolm
Keywords: ice-on-valid-code
Depends on:
Reported: 2020-03-03 07:09 UTC by Arseny Solokha
Modified: 2020-08-13 20:26 UTC (History)
0 users

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2020-03-03 00:00:00


Note You need to log in before you can comment on or make changes to this bug.
Description Arseny Solokha 2020-03-03 07:09:31 UTC
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 (); } ();

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
0x135f8d7 ana::region_model::handle_unrecognized_call(gcall const*, ana::region_model_context*)
0x133cc30 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::state_change*) const
0x133d3c1 ana::exploded_graph::process_node(ana::exploded_node*)
0x133d8aa ana::exploded_graph::process_worklist()
0x133dfd9 ana::impl_run_checkers(ana::logger*)
0x133ea7c ana::run_checkers()
0x1333908 execute
Comment 1 Martin Liška 2020-03-03 08:31:59 UTC
Confirmed, started with initial analyzer commit:
Comment 2 Arseny Solokha 2020-03-08 13:29:17 UTC
I see similar ICE when compiling gcc/testsuite/g++.old-deja/g++.eh/ptrmem1.C even w/ -fanalyzer alone.
Comment 3 David Malcolm 2020-08-13 20:26:13 UTC
The ICE should be fixed by 808f4dfeb3a95f50f15e71148e5c1067f90a126d (for GCC 11).  Marking this as fixed.