[patch,fortran] PR33162 Allow intrinsic functions in PROCEDURE statements
Jerry DeLisle
jvdelisle@verizon.net
Mon Nov 12 04:35:00 GMT 2007
:ADDPATCH fortran:
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?
Regards,
Jerry
2007-11-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33162
* 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 for
interface that points to an intrinsic function, use the new function.
* resolve.c (resolve_specific_f0): Resolve the intrinsic interface.
(resolve_specific_s0): Ditto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr33162-part3d.diff
Type: text/x-patch
Size: 7040 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071112/8b38495b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proc_decl_1.f90
Type: text/x-fortran
Size: 2102 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071112/8b38495b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proc_decl_7.f90
Type: text/x-fortran
Size: 470 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071112/8b38495b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proc_decl_8.f90
Type: text/x-fortran
Size: 614 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071112/8b38495b/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proc_decl_9.f90
Type: text/x-fortran
Size: 293 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071112/8b38495b/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proc_decl_10.f90
Type: text/x-fortran
Size: 803 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071112/8b38495b/attachment-0005.bin>
More information about the Fortran
mailing list