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

            Bug ID: 107882
           Summary: [13 Regression] ICE in get_last_bit_offset, at
                    analyzer/store.h:255
           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:

void
foo (int *x, int y)
{
  int *a = x, *b = (int *) &a;

  __builtin_memcpy (b + 1, x, y);
  foo (a, 0);
}

% gcc-13 -fanalyzer -c umtf33bl.c
during IPA pass: analyzer
umtf33bl.c: In function 'foo':
umtf33bl.c:7:3: internal compiler error: in get_last_bit_offset, at
analyzer/store.h:255
    7 |   foo (a, 0);
      |   ^~~~~~~~~~
0x7bf2d1 ana::bit_range::get_last_bit_offset() const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/store.h:255
0x7bf2d1 ana::bit_range::get_last_bit_offset() const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/store.h:253
0x7bf2d1 ana::bit_range::contains_p(ana::bit_range const&, ana::bit_range*)
const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/store.cc:243
0x1326bff ana::binding_cluster::maybe_get_compound_binding(ana::store_manager*,
ana::region const*) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/store.cc:1716
0x12ca6c6 ana::region_model::get_store_value(ana::region const*,
ana::region_model_context*) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:3158
0x12cae4c ana::region_model::get_rvalue(ana::path_var,
ana::region_model_context*) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:3052
0x12d1e97 ana::region_model::on_assignment(gassign const*,
ana::region_model_context*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/region-model.cc:1093
0x12a34d4 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:1466
0x12a65c5 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
0x12a757a ana::exploded_graph::process_worklist()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:3457
0x12a9d34 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
0x12aad66 ana::run_checkers()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/engine.cc:6198
0x1299578 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/analyzer/analyzer-pass.cc:87

Reply via email to