public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/114598] New: [GCC-14] Miscompilation of `#pragma omp parallel for`
@ 2024-04-05 4:18 141242068 at smail dot nju.edu.cn
2024-04-05 4:28 ` [Bug c/114598] " 141242068 at smail dot nju.edu.cn
0 siblings, 1 reply; 2+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2024-04-05 4:18 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/114598] [GCC-14] Miscompilation of `#pragma omp parallel for`
2024-04-05 4:18 [Bug c/114598] New: [GCC-14] Miscompilation of `#pragma omp parallel for` 141242068 at smail dot nju.edu.cn
@ 2024-04-05 4:28 ` 141242068 at smail dot nju.edu.cn
0 siblings, 0 replies; 2+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2024-04-05 4:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114598
wierton <141242068 at smail dot nju.edu.cn> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from wierton <141242068 at smail dot nju.edu.cn> ---
Seems invalid, as `j` is not private within the openmp region
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-05 4:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-05 4:18 [Bug c/114598] New: [GCC-14] Miscompilation of `#pragma omp parallel for` 141242068 at smail dot nju.edu.cn
2024-04-05 4:28 ` [Bug c/114598] " 141242068 at smail dot nju.edu.cn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).