[patch,fortran] PR33162 Allow intrinsic functions in PROCEDURE statements

Jerry DeLisle jvdelisle@verizon.net
Mon Nov 12 04:49:00 GMT 2007


Jerry DeLisle wrote:
> :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.

There is a spurious "My " in the error message added in gfc_procedure_use.  I 
have taken care of that. :)

Jerry



More information about the Fortran mailing list