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

20 lines
361 B
Fortran

! { dg-do compile }
integer :: r
r = 0
call foo (r)
if (r /= 11) stop 1
contains
subroutine foo (r)
integer :: i, r
!$omp parallel
!$omp single
!$omp target teams distribute parallel do reduction (+: r)
do i = 1, 10
r = r + 1
end do
r = r + 1
!$omp end single
!$omp end parallel
end subroutine
end