-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[Flang][OpenMP] Incorrect execution result of a do-variable defined as shared in parallel construct #78938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-openmp Author: None (ohno-fj)
```
Version of flang-new : 18.0.0(0fe86f9)
|
The code is non-confirming OpenMP code. There is a race condition on the |
Even removing the race condition, there is still an issue with flang, as the program below still prints subroutine s1
ip=100
!$omp parallel shared(ip)
!$omp single
DO ip = 0, 1
END DO
!$omp end single
!$omp end parallel
print *,'ip shared :',ip
end subroutine s1
program main
call s1
end program main It seems the problem is that flang is treating
|
Iteration variables of non-associated loops may be listed in DSA clauses. Fixes llvm#78938
@llvm/issue-subscribers-flang-frontend Author: None (ohno-fj)
```
Version of flang-new : 18.0.0(0fe86f9)
|
Iteration variables of non-associated loops may be listed in DSA clauses. Fixes #78938
A
do-variable
defined asshared
inparallel
construct has an incorrect value after executingparallel
construct.A
do-variable
is executing byprivate
, notshared
.The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
snggz567_22.f90:
The text was updated successfully, but these errors were encountered: