21 lines
361 B
Fortran
Raw Normal View History

2016-02-29 10:41:25 +01:00
! { dg-do compile }
integer :: r
r = 0
call foo (r)
2021-12-06 21:18:24 +00:00
if (r /= 11) stop 1
2016-02-29 10:41:25 +01:00
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