(j3.2006) Finalization ordering question

Jim Xia jimxia
Thu Oct 11 22:24:01 EDT 2007

> Suppose you have a base type, t, with a finalizable component, ft.  And 
> a type, e, that extends type t and  has a finalizable component fe.  If 
> you have an array type(e) :: x(3) and it is finalized, the recipe in 
> seems to say the finalizations has to be done in this order:
> Step 2:  x(1)%fe,  x(2)%fe, x(3)%fe
> Step 3:  x(1)%ft,  x(2)%ft,  x(3)%ft

That's how the standard defines the sequence of finalizations of an array 
of objects of extended type.  I wouldn't think of "efficiency" as an issue 
when finalizations are involved.  They appear in too many places (very 
often unnecessarily) and almost certain to produce inefficient code.


Jim Xia

XL Fortran Compiler Testing
IBM Toronto Lab at 8200 Warden Ave.
Phone (905) 413-3444  Tie-line 969-3444
D2/NAH/8200 /MKM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://j3-fortran.org/pipermail/j3/attachments/20071011/48c61d64/attachment.html 

More information about the J3 mailing list