…lauses Currently we only do semantic checks for REDUCTION. There are two other clauses, IN_REDUCTION, and TASK_REDUCTION which will also need those checks. Implement a function that checks the common list-item requirements for all those clauses.
17 lines
382 B
Fortran
17 lines
382 B
Fortran
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
|
|
|
|
! OpenMP 5.2: Section 5.5.5 : A procedure pointer must not appear in a
|
|
! reduction clause.
|
|
|
|
procedure(foo), pointer :: ptr
|
|
integer :: i
|
|
ptr => foo
|
|
!ERROR: Procedure pointer 'ptr' may not appear in a REDUCTION clause
|
|
!$omp do reduction (+ : ptr)
|
|
do i = 1, 10
|
|
end do
|
|
contains
|
|
subroutine foo
|
|
end subroutine
|
|
end
|