Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Flang] [Semantics] [OpenMP] Fix semantic check to not report error f…
…or compound OMP TARGET directives. (llvm#112059) For test program like this variable array is mentioned in both shared clause and map clause. For OMP TARGET compound directives like this where we have OMP TARGET TEAMS, map clause applies to TARGET directive and SHARED clause applies to TEAMS directive. So both SHARED and MAP clauses can co-exist. > program test > implicit none > integer :: array(10,10),i,j > !$omp target teams shared(array) map(tofrom:array) > do i=1,10 > !$omp parallel do > do j=1,10 > array(j,i)=i+j > end do > end do > !$omp end target teams > print *, array > end program test > > Before this PR we were checking for exclusivity for all target directives set which is now relaxed to exclusivity check not being applied to compound directives which can accept SHARED clause.
- Loading branch information