4 ! C_LOC expanded to a NULL_PTR expr if called from a structure constructor
6 ! Contributed by François-Xavier Coudert
11 type, bind(C) :: descr
12 type(C_PTR) :: address
15 double precision, target :: buf(1)
16 integer (C_INTPTR_T) :: i, j
19 DD = descr(c_loc(buf))
20 i = transfer (DD%address, 0_c_intptr_t)
21 j = transfer (c_loc(buf), 0_c_intptr_t)
22 if (any((/ i,j /) == 0_c_intptr_t)) call abort
23 if (i /= j) call abort