Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/libgomp/testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90

24 lines
320 B
Fortran
Raw Normal View History

2023-03-06 14:48:14 +01:00
! { dg-do run }
!
program foo
IMPLICIT NONE
INTEGER :: vol = 0
call bar (vol)
if (vol .ne. 2) stop 1
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