Debian Codegraph @

libgomp/testsuite/libgomp.oacc-fortran/class-ptr-param.f95

raw
1 ! { dg-do run }
2
3 module typemod
4
5 type mytype
6 integer :: a
7 end type mytype
8
9 contains
10
11 subroutine mysub(c)
12 implicit none
13
14 class(mytype), allocatable :: c
15
16 !$acc parallel copy(c)
17 c%a = 5
18 !$acc end parallel
19 end subroutine mysub
20
21 end module typemod
22
23 program main
24 use typemod
25 implicit none
26
27 class(mytype), allocatable :: myvar
28 allocate(mytype :: myvar)
29
30 myvar%a = 0
31 call mysub(myvar)
32
33 if (myvar%a .ne. 5) stop 1
34 end program main