[Patch, Fortran] PR42045: [F03] passing a procedure pointer component to a procedure pointer dummy
Janus Weil
janus@gcc.gnu.org
Sun Nov 22 08:46:00 GMT 2009
Hi all,
this patch fixes some trouble with PPCs which have no interface [i.e.
"procedure()"]. Up to now, what we did with these was to apply
implicit typing. However, Malcolm Cohen's draft answer to an
interpretation request by Tobias
(http://www.j3-fortran.org/doc/year/09/09-236r1.txt) states that PPCs
should never be implicitly typed. Due to this reasoning, a PPC without
explicit interface specification can only be a subroutine pointer (and
not a function pointer).
The patch also fixes the problem that John McFarland reported (which
was caused by the implicit typing of PPCs). It was regtested
successfully on x86_64-unknown-linux-gnu. Ok for trunk?
Cheers,
Janus
2009-11-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/42045
* resolve.c (resolve_actual_arglist): Make sure procedure pointer
actual arguments are resolved correctly.
(resolve_function): An EXPR_FUNCTION which is a procedure pointer
component, has already been resolved.
(resolve_fl_derived): Procedure pointer components should not be
implicitly typed.
2009-11-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/42045
* gfortran.dg/proc_ptr_comp_2.f90: Correct invalid test case.
* gfortran.dg/proc_ptr_comp_3.f90: Extended test case.
* gfortran.dg/proc_ptr_comp_24.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr42045.diff
Type: text/x-diff
Size: 2799 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091122/3082c086/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proc_ptr_comp_24.f90
Type: application/octet-stream
Size: 656 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091122/3082c086/attachment.obj>
More information about the Fortran
mailing list