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

            Bug ID: 111043
           Summary: ICE in adjust_loop_info_after_peeling, at
                    tree-ssa-loop-ivcanon.cc:1068
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shaohua.li at inf dot ethz.ch
                CC: jh at suse dot cz
  Target Milestone: ---

gcc crashes at -O2 on the following test case.

Bisected to r14-2675-gef28aadad6e, could be similar to bug 110769 and bug
110641, but the bisection points are different.

Compiler explorer: https://godbolt.org/z/Ghza4o7d4

$ cat a.c
int a, b, c, d;
short e;
int f() {
  a = 1;
  while (a) {
    c = b % a;
    b = a;
    a = c;
  }
  return b;
}
int g() {
  d = 0;
  for (; d <= 1; d++)
    e = 0;
  for (; f() + d - 3 + e; e = e + 8)
    ;
}
int main() {}
$
$ gcc-r14-2675-gef28aadad6e  -O2 a.c
during GIMPLE pass: ch_vect
a.c: In function ā€˜gā€™:
a.c:12:5: internal compiler error: in adjust_loop_info_after_peeling, at
tree-ssa-loop-ivcanon.cc:1068
   12 | int g() {
      |     ^
0x21789ce internal_error(char const*, ...)
        ???:0
0x9d3f84 fancy_abort(char const*, int, char const*)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$

Reply via email to