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

            Bug ID: 109274
           Summary: ice in in_chain_p, at gimple-range-gori.cc:119
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

This C++ code:

float mulsignf_cb, mulsignf_t, mulsignf_bpa;
int mulsignf___trans_tmp_1;
float mulsignf() {
  mulsignf_cb = 0 * -(2.0f * mulsignf_bpa);
  mulsignf___trans_tmp_1 = mulsignf_cb != mulsignf_cb ? 0 : mulsignf();
  mulsignf_t = mulsignf_bpa;
}

when compiled by recent g++ trunk and flag -O2, does this:

bug902.cc: In function ‘float mulsignf()’:
bug902.cc:7:1: warning: no return statement in function returning non-void
[-Wre
turn-type]
    7 | }
      | ^
during GIMPLE pass: vrp
bug902.cc:3:7: internal compiler error: in in_chain_p, at
gimple-range-gori.cc:1
19
    3 | float mulsignf() {
      |       ^~~~~~~~
0x92e285 range_def_chain::in_chain_p(tree_node*, tree_node*)
        ../../trunk.year/gcc/gimple-range-gori.cc:119
0x1fd69f4 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
t
ree_node*, fur_source&, value_relation*)
        ../../trunk.year/gcc/gimple-range-gori.cc:667

The bug first seems to appear sometime from git hash g:454a4d5041f53cd1 to
g:0963cb5fde158cce, a distance of 41 commits.

Reply via email to