mirror of
https://github.com/autc04/Retro68.git
synced 2024-08-19 03:29:10 +00:00
22 lines
393 B
Fortran
22 lines
393 B
Fortran
! { dg-do compile }
|
|
! { dg-options "-fopenmp" }
|
|
|
|
integer :: r
|
|
r = 0
|
|
call foo (r)
|
|
if (r /= 11) call abort
|
|
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
|