Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / class-ptr-param.f95
blob80147337c9d7faa8c55493f7a94942a512101b28
1 ! { dg-do run }
3 module typemod
5 type mytype
6 integer :: a
7 end type mytype
9 contains
11 subroutine mysub(c)
12 implicit none
14 class(mytype), allocatable :: c
16 !$acc parallel copy(c)
17 c%a = 5
18 !$acc end parallel
19 end subroutine mysub
21 end module typemod
23 program main
24 use typemod
25 implicit none
27 class(mytype), allocatable :: myvar
28 allocate(mytype :: myvar)
30 myvar%a = 0
31 call mysub(myvar)
33 if (myvar%a .ne. 5) stop 1
34 end program main