8 real, pointer :: p(:,:) => null()
12 type(p2d
), pointer :: v(:) => null()
15 type(test_cs
), pointer :: cs
16 real, allocatable
, target
:: e(:,:)
19 if (associated(cs
) .neqv
. .true
.) stop 1
22 if (associated(cs
%v
) .neqv
. .true
.) stop 2
27 if (query_ptr(e
, cs
) .neqv
. .true
.) stop 3
31 logical function query_ptr(f_ptr
, cs
)
33 real, target
, intent(in
) :: f_ptr(:,:)
34 type(test_cs
), pointer, intent(inout
) :: cs
36 if (associated(cs
)) then
37 if (associated(cs
%v
) .neqv
. .true
.) stop 4
39 if (associated(cs
%v(2)%p
) .neqv
. .true
.) stop 5
40 query_ptr
= associated(cs
%v(2)%p
, f_ptr
)
44 end function query_ptr