You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the OpenMP specification, Loop iteration variables inside parallel, teams, or task generating constructs are private in the innermost such construct that encloses the loop.
In the following example:
subroutinetest()
integer:: x
!$omp task
do i =1, 10
x =1end do
!$omp end task
endsubroutine
The loop iteration variable i must be treated as private to task. However, the current behavior treats i as firstprivate, which is incorrect.
Here is the generated FIR which treats the variable i as firstprivate : Godbolt link