Retro68/gcc/libgomp/testsuite/libgomp.oacc-fortran/pr83920.f90
2018-12-28 16:30:48 +01:00

29 lines
535 B
Fortran

! { dg-do run }
subroutine foo (BETA, C)
real :: C(100,100)
integer :: i, j, l
real, parameter :: one = 1.0
real :: beta
!$acc parallel copy(c(1:100,1:100)) num_gangs(2)
!$acc loop gang
do j = 1, 100
if (beta /= one) then
!$acc loop vector
do i = 1, 100
C(i,j) = 0.0
end do
end if
end do
!$acc end parallel
end subroutine foo
program test_foo
real :: c(100,100), beta
beta = 0.0
c(:,:) = 1.0
call foo (beta, c)
if (c(1,1) /= 0.0) STOP 1
end program test_foo