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
Confirmed, started with initial analyzer commit: r10-5950-g757bf1dff5e8cee3
I see similar ICE when compiling gcc/testsuite/g++.old-deja/g++.eh/ptrmem1.C even w/ -fanalyzer alone.
The ICE should be fixed by 808f4dfeb3a95f50f15e71148e5c1067f90a126d (for GCC 11). Marking this as fixed.