Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/libgomp/testsuite/libgomp.oacc-fortran/class-ptr-param.f95
2023-03-06 14:48:14 +01:00

34 lines
445 B
Fortran

! { dg-do run }
module typemod
type mytype
integer :: a
end type mytype
contains
subroutine mysub(c)
implicit none
class(mytype), allocatable :: c
!$acc parallel copy(c)
c%a = 5
!$acc end parallel
end subroutine mysub
end module typemod
program main
use typemod
implicit none
class(mytype), allocatable :: myvar
allocate(mytype :: myvar)
myvar%a = 0
call mysub(myvar)
if (myvar%a .ne. 5) stop 1
end program main