Retro68/gcc/libgomp/testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90

20 lines
340 B
Fortran
Raw Normal View History

2019-06-02 15:48:37 +00:00
! 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