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

            Bug ID: 112489
           Summary: GCC: 14: internal compiler error: in
                    check_loop_closed_ssa_def, at
                    tree-ssa-loop-manip.cc:647
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 141242068 at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://gcc.godbolt.org/z/89rPW14fv

When compile this program with `gcc-14 -O3 -fno-tree-dominator-opts`, gcc-14
crashes.
```
#define M 3000
static double a[M][M], b[M][M], c[M][M];

int N;
struct T {
  int k;
  double a[M][M];
} v;
void f() {
  for (int i = 0; i < N; i) {
    for (int j = 0; j < N; j++) {
      for (v.k = j; +v.k < N; v.k++) {
        c[j][v.k] += v.a[i][j] * b[i][v.k] +
                     b[i][-j] * v.a[i - i][+v.k];
        c[j][v.k] += v.a[i][j] * b[i][v.k] +
                     b[i][-j] * v.a[i - i][-v.k];
      }
    }
  }
}
```

The crash output:
```
during GIMPLE pass: ch_vect
<source>: In function 'f':
<source>:9:6: internal compiler error: in check_loop_closed_ssa_def, at
tree-ssa-loop-manip.cc:647
    9 | void f() {
      |      ^
0x238b15e internal_error(char const*, ...)
        ???:0
0xa11270 fancy_abort(char const*, int, char const*)
        ???:0
0x12c17de verify_loop_closed_ssa(bool, loop*)
        ???: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.
Compiler returned: 1
```
  • [Bug c/112489] New: GCC: 14... 141242068 at smail dot nju.edu.cn via Gcc-bugs

Reply via email to