[Patch, Fortran] PR 47023: C_Sizeof: Rejects valid code
Janus Weil
janus@gcc.gnu.org
Mon Oct 17 21:37:00 GMT 2011
Hi all,
here is another patch for PR47023, which takes care of comment #1,
i.e. rejecting polymorphic variables in a C-binding context. It also
adapts two functions (verify_c_interop,verify_c_interop_param) to the
gfortran naming convention of prefixing public routines with 'gfc_',
and fixes an error message which had incorrect wording. The only
nontrivial part of the patch is in decl.c (the rest is just renaming).
Regtested on x86_64-unknown-linux-gnu. Ok for trunk?
Cheers,
Janus
2011-10-17 Janus Weil <janus@gcc.gnu.org>
PR fortran/47023
* decl.c (verify_c_interop_param): Renamed to
'gfc_verify_c_interop_param'. Add error message for polymorphic
arguments.
(verify_c_interop): Renamed to 'gfc_verify_c_interop'. Reject
polymorphic variables.
(verify_bind_c_sym): Renamed 'verify_c_interop'.
* gfortran.h (verify_c_interop,verify_c_interop_param): Renamed.
* check.c (gfc_check_sizeof): Ditto.
* resolve.c (gfc_iso_c_func_interface,resolve_fl_procedure): Ditto.
* symbol.c (verify_bind_c_derived_type): Ditto.
2011-10-17 Janus Weil <janus@gcc.gnu.org>
PR fortran/47023
* gfortran.dg/iso_c_binding_class.f03: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr47023_c1.diff
Type: text/x-diff
Size: 5510 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111017/e0155f7e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iso_c_binding_class.f03
Type: application/octet-stream
Size: 303 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111017/e0155f7e/attachment.obj>
More information about the Fortran
mailing list