[Patch, fortran] PR20896 - dummy procedures interfaces

Paul Thomas paulthomas2@wanadoo.fr
Sat Jan 13 17:41:00 GMT 2007


Dominique,
> It is not the way I read 12.4.1.2. My reading is:
> 1) if it is typed or it is used as a function (I assume it means
> something like a=b() within the scoping unit), then it is a function;
> 2) if it is not typed and used as a subroutine (I assume it means
> something like CALL b() within the scoping unit), then it a subroutine;
> 3) otherwise it will be resolved at the level of the external procedure
> to which it is passed as a dummy argument, hence could not be used in a 
> generic interface.
>   
This is the way that the attached version of the patch does it.  In 
practical terms, this means that an external procedure without an 
explicit interface, within another interface, can only unambiguously be 
a function.  Thus EXTERNAL P; REAL P is ambiguous with functions, 
subroutines and all other EXTERNAL symbols.  On the other hand, EXTERNAL 
P is ambiguous with any procedure.

Bootstrapped and regtested on IA64/FC5 - OK for trunk and after, >1 
week, for 4.2?

Paul


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change.Logs
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070113/4355f993/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr20896.diff
Type: text/x-patch
Size: 10067 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070113/4355f993/attachment.bin>


More information about the Fortran mailing list