view libgomp/testsuite/libgomp.fortran/target5.f90 @ 138:fc828634a951

merge
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 08 Nov 2018 14:17:14 +0900
parents 84e7813d76e9
children 1830386684a0
line wrap: on
line source

! { 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