Retro68/gcc/libgomp/testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90
Wolfgang Thaller 6fbf4226da gcc-9.1
2019-06-20 20:10:10 +02:00

22 lines
306 B
Fortran

program foo
IMPLICIT NONE
INTEGER :: vol = 0
call bar (vol)
if (vol .ne. 2) call abort
end program foo
subroutine bar(vol)
IMPLICIT NONE
INTEGER :: vol
INTEGER :: j
!$ACC KERNELS
!$ACC LOOP REDUCTION(+:vol)
DO j=1,2
vol = vol + 1
ENDDO
!$ACC END KERNELS
end subroutine bar