This is the mail archive of the
mailing list for the GCC project.
Re: [patch,fortran] PR33162 Allow intrinsic functions in PROCEDURE statements
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 11 Nov 2007 20:34:07 -0800
- Subject: Re: [patch,fortran] PR33162 Allow intrinsic functions in PROCEDURE statements
- References: <4737D560.email@example.com>
Jerry DeLisle wrote:
This patch allows intrinsics in PROCEDURE statements by removing the
error call in decl.c and adding the necessary checks and resolving the
interfaces. This is the last part to fixing this PR.
It has taken some time to get to this point, so I thought it best to get
this out for review and testing with real code.
I think the explanation in the ChangeLog is sufficient.
Thanks to Janus Weil for several off list comments, now resolved.
Regression tested on x86-64. New test cases provided. One error
condition in proc_decl_1.f90 is no longer an error, so that test is
modified. See attached.
OK for trunk?
2007-11-11 Jerry DeLisle <firstname.lastname@example.org>
* decl.c (match_procedure_decl): Remove TODO and allow intrinsics in
PROCEDURE declarations. Set attr.untyped to allow the interface to be
resolved later where the symbol type will be set.
* interface.c (compare_intr_interfaces): Remove static from pointer
declarations. Add type and kind checks for dummy function arguments.
(compare_actual_formal_intr): New function to compare an actual
argument with an intrinsic function. (gfc_procedures_use): Add check
interface that points to an intrinsic function, use the new function.
There is a spurious "My " in the error message added in gfc_procedure_use. I
have taken care of that. :)