(j3.2006) allocatable components and TRANSFER

Malcolm Cohen malcolm
Fri Oct 30 05:15:07 EDT 2009


Robert Corbett wrote:
> A member of Sun's Fortran team raised a question about
> allocatable components and the intrinsic function
> TRANSFER.  He (in effect) asked if the program

I have never thought that TRANSFER to or from an object with an allocatable 
component ought to be allowed.  In general, doing that is going to leak memory 
or corrupt memory (unless we mandate garbage collection, though maybe some 
slightly less onerous implementation techniques would suffice).  There doesn't 
seem to be any functionality gain in allowing it.

It's not entirely clear whether the standard actually forbids it though.  At 
least some cases would be forbidden on the grounds that an interpretation is not 
established, but I don't think that covers everything.

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo.
 




More information about the J3 mailing list