(j3.2006) Finalization ordering question

Bill Long longb
Wed Oct 24 14:16:48 EDT 2007

Aleksandar Donev wrote:
>> 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
> Yes, but in arbitrary array-element order (Step 2 does not specify any 
> ordering).

>> Step 3:  x(1)%ft,  x(2)%ft,  x(3)%ft
> No, you finalize x%ft. If there is a rank-1 finalizer in the parent type, you 
> call that. Otherwise, you do element-by-element.
Yes, I agree that's what the standard says.  And how our implementation 
works.  I am worried that Jim (IBM) has done it the other way since that 
corresponds to different semantics, so codes would not be portable.  Has 
anyone else implemented finalization of polymorphics?


Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120


More information about the J3 mailing list