2022-11-04 09:35:42 -07:00

21 lines
382 B
Fortran

! @@name: reduction.3
! @@type: F-free
! @@operation: compile
! @@expect: ct-error
! @@version: pre_omp_3.0
PROGRAM REDUCTION_WRONG
MAX = HUGE(0)
M = 0
!$OMP PARALLEL DO REDUCTION(MAX: M)
! MAX is no longer the intrinsic so this is non-conforming
DO I = 1, 100
CALL SUB(M,I)
END DO
END PROGRAM REDUCTION_WRONG
SUBROUTINE SUB(M,I)
M = MAX(M,I)
END SUBROUTINE SUB