[Patch, Fortran, OOP] PR 54667: gimplification failure with c_f_pointer

Janus Weil janus@gcc.gnu.org
Sat Sep 22 22:01:00 GMT 2012


Hi all,

this patch fixes an ICE recently reported by Andrew Benson. It does so
by rejecting polymorphic arguments to the C_F_POINTER intrinsic. For
discussion and standard references, please refer to the PR and today's
email thread.

Apart from fixing this PR, the patch modifies two other error messages
related to C_F_POINTER (adding the name of the formal arg in the
message and applying correct Fortran terminology through the
replacement 'parameter' -> 'argument'). It also fixes the grammar in
the documentation of C_F_POINTER.

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

Cheers,
Janus


2012-09-22  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/54667
	* intrinsic.texi (C_F_POINTER): Fix description.
	* resolve.c (gfc_iso_c_sub_interface): Add a check for FPTR argument
	of C_F_POINTER. Modify two error messages. Cleanup.

2012-09-22  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/54667
	* gfortran.dg/c_funloc_tests_6.f90: Modified error message.
	* gfortran.dg/c_f_pointer_shape_test.f90: Ditto.
	* gfortran.dg/c_f_pointer_tests_5.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr54667.diff
Type: application/octet-stream
Size: 5413 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120922/228267cb/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c_f_pointer_tests_5.f90
Type: application/octet-stream
Size: 312 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120922/228267cb/attachment-0001.obj>


More information about the Fortran mailing list