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

20 lines
340 B
Fortran

! Test a simple acc loop reduction inside a kernels region.
! { dg-do run }
program reduction
integer, parameter :: n = 20
integer :: i, red
red = 0
!$acc kernels
!$acc loop reduction (+:red)
do i = 1, n
red = red + 1
end do
!$acc end kernels
if (red .ne. n) call abort
end program reduction