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

            Bug ID: 114598
           Summary: [GCC-14] Miscompilation of `#pragma omp parallel for`
           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/MPzrsv17v

```
#include <stdio.h>

#define N 2000
int a[N][N];

int main (void)
{
  int i = 0, j = 0;
  for (i = 0; i < N; i++)
    #pragma omp parallel for
    for (j = 0; j < N; j++)
      a[i][j] = i + j;
  return 0;
}
```

This program will crash if compiled with `gcc-14 -fopenmp-simd`, while clang
can correctly compile it.
  • [Bug c/114598] New: [GCC-14... 141242068 at smail dot nju.edu.cn via Gcc-bugs

Reply via email to