(j3.2006) types of actual arguments associated with dummy procedures

Robert Corbett Robert.Corbett
Fri May 15 03:39:22 EDT 2009

Malcolm Cohen wrote:
> Robert Corbett wrote:
>>If a function is passed as an actual argument to a dummy procedure
>>in FORTRAN 77, the FORTRAN 77 standard requires the function and
>>the dummy procedure to have the same type
> That's right.
> Re F90 and later: I remember this coming up in discussion, and there was 
> certainly no intention to delete this requirement (all of /DATA were 
> agreed on that part), but I agree that it is not clearly stated - which 
> is why we were discussing it.  Unfortunately the discussion was on one 
> of those days when every time I opened the standard I found a new bug, 
> and since we were wrestling with many other problems it got put off as 
> "probably there somewhere, everyone knows it's required anyway".  This 
> was during F2003 development (maybe around 2000/2001).
> Hmm, I think the requirement is buried in the fact that if the types 
> don't match the words of the standard don't establish a meaningful 
> interpretation (at least for the obvious examples), but that's a pretty 
> blunt instrument to be hitting the problem with.  If someone feels 
> inspired to write a paper for the next meeting clarifying it that would 
> be a good idea.

That instrument is too blunt, in that there are several possible 
interpretations which place different requirements on implementations.
For example, it might be that only the scoping units that contain
function references where the procedure designator is the dummy
procedure need to get the dummy procedure's type right.  That
interpretation would work for g95 and gfortran, but would not be
compatible with the calling conventions used by Sun Fortran and some
other Fortran implementations.

I shall try to write a paper for the next meeting.

Bob Corbett

More information about the J3 mailing list