aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.oacc-fortran/routine-5.f90
blob: 956da8ed043c2163acb0f9cf65715284c27eae74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
! { dg-do run }
! { dg-options "-fno-inline" }

program main
    integer :: n

    n = 5

    !$acc parallel copy (n)
      n = func (n)
    !$acc end parallel

    if (n .ne. 6) call abort

contains

    function func (n) result (rc)
    !$acc routine
    integer, intent (in) :: n
    integer :: rc

    rc = n
    rc = rc + 1

    end function

end program