2 ! { dg-options "-std=f2003" }
4 ! Testcase contributed by Seth Johnson <johnsonsr@ornl.gov>
14 class(Cls
), pointer :: ptr
17 subroutine to_ptr(c
, p
)
19 class(Cls
), intent(in
), target
:: c
20 type(C_PTR
), intent(out
) :: p
21 type(ClsHandle
), pointer :: handle
27 subroutine from_ptr(p
, c
)
29 type(C_PTR
), intent(in
) :: p
30 class(Cls
), intent(out
), pointer :: c
31 type(ClsHandle
), pointer :: handle
32 call c_f_pointer(cptr
=p
, fptr
=handle
)