[Patch, Fortran] PR 47023: C_Sizeof: Rejects valid code

Tobias Burnus burnus@net-b.de
Tue Oct 18 09:06:00 GMT 2011


On 10/17/2011 11:37 PM, Janus Weil wrote:
> here is another patch for PR47023, which takes care of comment #1,
> i.e. rejecting polymorphic variables in a C-binding context.
>
> Regtested on x86_64-unknown-linux-gnu. Ok for trunk?

OK. Thanks for the patch.

If I saw it correctly, one still needs to fix the vendor-extension 
SIZEOF for procedure pointers (it currently returns one byte!) - and the 
issue in the original bug (comment 0).

Tobias

> 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.



More information about the Gcc-patches mailing list