Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/libgomp/testsuite/libgomp.oacc-fortran/pr68813.f90
2023-03-06 14:48:14 +01:00

21 lines
388 B
Fortran

! { dg-do run }
!
program foo
implicit none
integer, parameter :: n = 100
integer, dimension(n,n) :: a
integer :: i, j, sum = 0
a = 1
!$acc parallel copyin(a(1:n,1:n)) firstprivate (sum)
!$acc loop gang reduction(+:sum)
do i=1, n
!$acc loop vector reduction(+:sum)
do j=1, n
sum = sum + a(i, j)
enddo
enddo
!$acc end parallel
end program foo