Files
clang-p2996/flang/test/Semantics/OpenMP/reduction12.f90
Krzysztof Parzyszek 02db35a1d6 [flang][OpenMP] Implement CheckReductionObjects for all reduction c… (#118689)
…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.
2024-12-06 12:00:48 -06:00

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