------- Comment #1 from burnus at gcc dot gnu dot org  2009-01-17 10:46 -------
The example was wrong as the name is c_f_PROCpointer (no -fun- only in
type(c_funptr) and c_FUNloc). Working example:

use iso_c_binding
type(c_ptr) :: fun
procedure(), pointer :: bar
call c_f_procpointer(fun,bar)  ! << fun is c_ptr not c_funptr
end

The same for C_F_POINTER:

use iso_c_binding
type(c_funptr) :: fun
integer, pointer :: bar
call c_f_pointer(fun,bar) ! << fun is c_funptr not a normal c_ptr
end

The "bar" argument seems to be correctly checked.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|c_f_funpointer - add missing|c_f_procpointer/c_f_pointer
                   |argument checking           |- add missing argument
                   |                            |checking


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38894

Reply via email to