gfortran feature request: internal procedures as actual arguments

Toon Moene toon@moene.indiv.nluug.nl
Tue Jul 31 18:20:00 GMT 2007


Paul Thomas wrote:

> Bill,
>>
>>> I  could be wrong, but this is prohibited by at least the Fortran
>>> 2003 standard. 
>>
>> Yup, I know that.  It is (imho) the biggest blunder in the design.
>> I can only imagine that it was proposed by the Intel folks (since
>> they went ahead and implemented it anyway) and rejected by
>> others who didn't immediately see how to make it work.

I have to be careful, because I'm working from memory here - I think
the restriction was due to the fact that we had a hard time coming up
with a complete proof that nothing the internal procedure could access
would go out of scope.

> I think that I can see pretty quickly how to make it work if I forget 
> about optimization - once function inlining starts, I do not know how to 
> keep the procedure itself in play.  In spite of my opposition (or, 
> perhaps, because of it!), I'll take a look.

I think that in the 2008 Standard, we've warmed our collective cold feet 
about the above mentioned problem.  See for instance Note 12.20 in:
http://j3-fortran.org/ -> WG5 -> N1678.pdf

Cheers,

-- 
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.indiv.nluug.nl/~toon/
Who's working on GNU Fortran: 
http://gcc.gnu.org/ml/gcc/2007-01/msg00059.html



More information about the Fortran mailing list