https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107777
Bug ID: 107777 Summary: [13 Regression] ICE in get_representative_path_var_1, at analyzer/region-model.cc:4750 Product: gcc Version: 13.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: --- gcc 13.0.0 20221120 snapshot (g:a16a5460447eaaff0b4468064e4d7b1cc8fc42eb) ICEs when compiling the following testcase w/ -fanalyzer: int * __errno_location (void); long int read (int, void *, unsigned long int); struct IOBUF { int fd; }; void do_getline_end_data (struct IOBUF *iop, int tree) { char end_data; if (tree) *__errno_location () = 0; read (iop->fd, &end_data, sizeof end_data); } % gcc-13 -fanalyzer -c ofd9impz.c during IPA pass: analyzer ofd9impz.c: In function 'do_getline_end_data': ofd9impz.c:19:3: internal compiler error: in get_representative_path_var_1, at analyzer/region-model.cc:4750 19 | read (iop->fd, &end_data, sizeof end_data); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x7bd41c ana::region_model::get_representative_path_var_1(ana::region const*, hash_set<ana::svalue const*, false, default_hash_traits<ana::svalue const*> >*) const /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:4750 0x12cbbd8 ana::region_model::get_representative_path_var(ana::region const*, hash_set<ana::svalue const*, false, default_hash_traits<ana::svalue const*> >*) const /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:4896 0x131dc1f ana::binding_cluster::get_representative_path_vars(ana::region_model const*, hash_set<ana::svalue const*, false, default_hash_traits<ana::svalue const*> >*, ana::region const*, ana::svalue const*, auto_vec<ana::path_var, 0ul>*) const /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/store.cc:2111 0x131e7e8 ana::store::get_representative_path_vars(ana::region_model const*, hash_set<ana::svalue const*, false, default_hash_traits<ana::svalue const*> >*, ana::svalue const*, auto_vec<ana::path_var, 0ul>*) const /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/store.cc:2987 0x12cb1a8 ana::region_model::get_representative_path_var_1(ana::svalue const*, hash_set<ana::svalue const*, false, default_hash_traits<ana::svalue const*> >*) const /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:4626 0x12cb501 ana::region_model::get_representative_path_var(ana::svalue const*, hash_set<ana::svalue const*, false, default_hash_traits<ana::svalue const*> >*) const /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:4693 0x12cb501 ana::region_model::get_representative_path_var(ana::svalue const*, hash_set<ana::svalue const*, false, default_hash_traits<ana::svalue const*> >*) const /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:4685 0x12cb501 ana::region_model::get_representative_tree(ana::svalue const*) const /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:4712 0x12add04 ana::impl_sm_context::get_diagnostic_tree(tree_node*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:433 0x13089ef check_for_open_fd /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/sm-fd.cc:1550 0x1309cfc on_read /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/sm-fd.cc:1533 0x1309cfc on_stmt /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/sm-fd.cc:1246 0x12a590f ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, ana::path_context*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:1485 0x12a8895 ana::exploded_graph::process_node(ana::exploded_node*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:4054 0x12a984a ana::exploded_graph::process_worklist() /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:3457 0x12abfd4 ana::impl_run_checkers(ana::logger*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:6110 0x12acfd6 ana::run_checkers() /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:6198 0x129b8d8 execute /var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/analyzer-pass.cc:87