4 use iso_c_binding
, only
: c_ptr
, c_null_ptr
, c_ptr
, c_associated
, c_loc
6 real, target
:: t
= 3.14
7 type(c_ptr
) :: nullptr
,c
13 if (c_associated(c
)) STOP 2
15 if (.not
. c_associated(c
)) STOP 3
17 if (c_associated(c
)) STOP 4
20 call association_test(k
, c
)
22 subroutine association_test(a
,b
)
23 use iso_c_binding
, only
: c_associated
, c_loc
, c_ptr
27 if(c_associated(b
, c_loc(a
))) then
32 end subroutine association_test