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

--- Comment #4 from Arseny Solokha <asolokha at gmx dot com> ---
Finally, a C testcase, and w/o -funreachable-traps:

void
foo (double *arr)
{
  int i, j;

  for (i = 0; i < 4; ++i)
    for (j = 0; j < 4; ++j)
      arr[j] = 0;

  for (i = 1; i < 4; ++i)
    for (j = 0; j < 4; ++j)
      arr[j] = 1.0 / (i + 1);
}

% gcc-13.0.0 -O1 -floop-unroll-and-jam --param unroll-jam-min-percent=0 -c
o87rfyb9.c
during GIMPLE pass: unrolljam
o87rfyb9.c: In function 'foo':
o87rfyb9.c:2:1: internal compiler error: in check_loop_closed_ssa_def, at
tree-ssa-loop-manip.cc:645
    2 | foo (double *arr)
      | ^~~
0x772a0b check_loop_closed_ssa_def
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220710/work/gcc-13-20220710/gcc/tree-ssa-loop-manip.cc:645
0x1064e6f check_loop_closed_ssa_bb
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220710/work/gcc-13-20220710/gcc/tree-ssa-loop-manip.cc:670
0x1066116 verify_loop_closed_ssa(bool, loop*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220710/work/gcc-13-20220710/gcc/tree-ssa-loop-manip.cc:695
0x1066116 verify_loop_closed_ssa(bool, loop*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220710/work/gcc-13-20220710/gcc/tree-ssa-loop-manip.cc:679
0x1068849 checking_verify_loop_closed_ssa
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220710/work/gcc-13-20220710/gcc/tree-ssa-loop-manip.h:34
0x1068849 tree_transform_and_unroll_loop(loop*, unsigned int, tree_niter_desc*,
void (*)(loop*, void*), void*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220710/work/gcc-13-20220710/gcc/tree-ssa-loop-manip.cc:1431
0x1cf56cc tree_loop_unroll_and_jam
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220710/work/gcc-13-20220710/gcc/gimple-loop-jam.cc:595

Reply via email to