-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[Flang][OpenMP]Incorrect execution result of LASTPRIVATE clause specified in DO construct #64055
Comments
@llvm/issue-subscribers-flang-frontend |
@llvm/issue-subscribers-openmp |
The current implementation does not handle the special case of lastprivate of iteration variable. When the conditional modifier appears on the clause or the list item is an iteration variable of one of the associated loops, if sequential execution of the loop nest would assign a value to the list item then the original list item is assigned the value that the list item would have after sequential execution of the loop nest. |
Thank you for your comment. I understood the current implementation. |
Sorry, please keep it open since there is an issue here. |
Iteration variables behave slightly different with LASTPRIVATE, as they must be assigned the value that the copy would have after sequential execution of the loop. This case is now handled. This patch also fixes LASTPRIVATE for loops where the step is different from 1. Fixes llvm#64055
Iteration variables behave slightly different with LASTPRIVATE, as they must be assigned the value that the copy would have after sequential execution of the loop. This case is now handled. This patch also fixes LASTPRIVATE for loops where the step is different from 1. Fixes #64055
@llvm/issue-subscribers-flang-ir Author: None (ohno-fj)
```
Version of flang-new : 17.0.0(3ff080b)
```
omp_PARALLELDO_005i_2.f: program main
integer*4 ia, ib(50), ier
integer*4 :: loop=50
ia = 0
ib = 0
!$omp parallel do lastprivate(ia)
do ia=1,loop
ib(ia) = ia
enddo
!$omp end parallel do
write(*,*) " ia=",ia," It must be ",loop+1
end
|
LASTPRIVATE
clause specified inDO
construct does not seem to be valid.omp_PARALLELDO_005i_2.f:
The text was updated successfully, but these errors were encountered: