llvm-project
llvm-project copied to clipboard
[flang][OpenMP] Diagnose invalid reduction modifiers
Currently the flang frontend will accept the following code. The task modifier on the reduction clause is only valid for certain constructs, and simd is not one of them.
subroutine fred(x)
integer, intent(inout) :: x
!$omp simd reduction(task, +:x)
do i = 1, 100
x = foo(i)
enddo
!$omp end simd
end
@llvm/issue-subscribers-openmp
Author: Krzysztof Parzyszek (kparzysz)
Currently the flang frontend will accept the following code. The `task` modifier on the `reduction` clause is only valid for certain constructs, and `simd` is not one of them.
subroutine fred(x)
integer, intent(inout) :: x
!$omp simd reduction(task, +:x)
do i = 1, 100
x = foo(i)
enddo
!$omp end simd
end
@llvm/issue-subscribers-flang-frontend
Author: Krzysztof Parzyszek (kparzysz)
Currently the flang frontend will accept the following code. The `task` modifier on the `reduction` clause is only valid for certain constructs, and `simd` is not one of them.
subroutine fred(x)
integer, intent(inout) :: x
!$omp simd reduction(task, +:x)
do i = 1, 100
x = foo(i)
enddo
!$omp end simd
end