aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran/nested-fn.f90
blob: db269643807626ac8991b396c5918d5f5f6b945e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
! { dg-do run }

program foo
  integer :: count
  call s1
contains

  subroutine s1 ()
    integer :: i, count

    count = 0

    !$omp target parallel do map(tofrom:count) reduction(+:count) private(i)
    !$omp unroll partial
    do i = 1, 100
      count = count + 1
    end do

    if (count .ne. 100) stop 1

  end subroutine

end program