[Patch, Fortran, OOP] PR 44925: C_LOC with CLASS pointer

Janus Weil janus@gcc.gnu.org
Tue Jul 13 21:35:00 GMT 2010


Hi all,

the attached patch fixes a problem with C_LOC. Passing a polymorphic
variable to C_LOC would be rejected with the wrong error message: The
pointer/target check was wrong (didn't handle classes) and a check for
polymorphics was missing.

Regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus



2010-07-13  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44925
	* gfortran.h (gfc_is_data_pointer): Remove prototype.
	* dependency.c (gfc_is_data_pointer): Make it static.
	* resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
	and add a check for polymorphic variables.


2010-07-13  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44925
	* gfortran.dg/c_loc_tests_15.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr44925.diff
Type: application/octet-stream
Size: 3124 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100713/523f2ed4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c_loc_tests_15.f90
Type: application/octet-stream
Size: 326 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100713/523f2ed4/attachment-0001.obj>


More information about the Gcc-patches mailing list