2 ! { dg-additional-sources only_clause_main.c }
6 subroutine testOnly(cIntPtr
) bind(c
, name
="testOnly")
7 use, intrinsic :: iso_c_binding
, only
: c_ptr
, c_int
, c_f_pointer
9 type(c_ptr
), value
:: cIntPtr
10 integer(c_int
), pointer :: f90IntPtr
12 call c_f_pointer(cIntPtr
, f90IntPtr
)
14 ! f90IntPtr coming in has value of -11; this will make it -12
15 f90IntPtr
= f90IntPtr
- 1
16 if(f90IntPtr
.ne
. -12) then
19 end subroutine testOnly
20 end module testOnlyClause