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

            Bug ID: 106845
           Summary: [13 Regression] ICE in exceeds_p, at
                    analyzer/store.cc:464
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: tlange at gcc dot gnu.org
  Target Milestone: ---

gcc 13.0.0 20220904 snapshot (g:20d30e737ad79dc36817e59f1676aa8bc0c6b325) ICEs
when compiling the following testcase w/ -fanalyzer:

int buf_size;

int
main (void)
{
  char buf[buf_size];

  __builtin_memset (&buf[1], 0, buf_size);

  return 0;
}

% gcc-13.0.0 -fanalyzer -c vuqxegnn.c
during IPA pass: analyzer
vuqxegnn.c: In function 'main':
vuqxegnn.c:8:3: internal compiler error: in exceeds_p, at analyzer/store.cc:464
    8 |   __builtin_memset (&buf[1], 0, buf_size);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x7cd727 ana::byte_range::exceeds_p(ana::byte_range const&, ana::byte_range*)
const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/store.cc:464
0x12d8d97 ana::region_model::check_region_bounds(ana::region const*,
ana::access_direction, ana::region_model_context*) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/region-model.cc:1658
0x12d9121 ana::region_model::check_region_access(ana::region const*,
ana::access_direction, ana::region_model_context*) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/region-model.cc:3234
0x12d9121 ana::region_model::check_region_for_write(ana::region const*,
ana::region_model_context*) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/region-model.cc:3255
0x12f03e8 ana::region_model::impl_call_memset(ana::call_details const&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/region-model-impl-calls.cc:548
0x12debc0 ana::region_model::on_call_pre(gcall const*,
ana::region_model_context*, bool*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/region-model.cc:1953
0x12e9a12 ana::region_model::on_stmt_pre(gimple const*, bool*, bool*,
ana::region_model_context*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/region-model.cc:1257
0x12b5878 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_p20220904/work/gcc-13-20220904/gcc/analyzer/engine.cc:1430
0x12b871f ana::exploded_graph::process_node(ana::exploded_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/engine.cc:3868
0x12b974a ana::exploded_graph::process_worklist()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/engine.cc:3271
0x12bbe3c ana::impl_run_checkers(ana::logger*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/engine.cc:5912
0x12bce8e ana::run_checkers()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/engine.cc:5986
0x12abdf8 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220904/work/gcc-13-20220904/gcc/analyzer/analyzer-pass.cc:87

Reply via email to