This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38894] c_f_procpointer/c_f_pointer - add missing argument checking
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2009 10:46:29 -0000
- Subject: [Bug fortran/38894] c_f_procpointer/c_f_pointer - add missing argument checking
- References: <bug-38894-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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