This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Fortran, F03] PR 54285: Calling a PPC with proc-ptr result


Hi all,

here is another proc-ptr patch, which allows to submit calls to
procedure-pointer components which have a procedure-pointer result.
This sounds a bit twisted (and I guess one has to suffer from some
very special form of mental illness in order to feel the urge to do
something like this), but apparently it is allowed by the standard,
and by chance I came across it recently.

Fortunately the patch is rather straightforward and just makes some
minor adjustments in the corresponding parsing and checking routines.
Regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus


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

	PR fortran/54285
	* expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers
	as function results.
	* primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr
	result.

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

	PR fortran/54285
	* gfortran.dg/proc_ptr_result_7.f90: New.

Attachment: pr54285.diff
Description: Binary data

Attachment: proc_ptr_result_7.f90
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]