https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127128
Bug ID: 127128
Summary: DO CONCURRENT with type spec gives wrong results
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jvdelisle at gcc dot gnu.org
Target Milestone: ---
Created attachment 65445
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65445&action=edit
Bug reproducer
The attached gives wrong results silently. Other variations can segfault.
$ gfc do-concurrent-typespec-shadow.f90
$ ./a.out
IF 0 0 0 0 0
COMPCALL 99 99 99 99 99
ALLOCATE 99 99 99 99 99
The different cases relate to the code paths involved. The expected results:
$ flang do-concurrent-typespec-shadow.f90
$ ./a.out
IF 0 0 3 0 0
COMPCALL 1 2 3 4 5
ALLOCATE 1 2 3 4 5