(j3.2006) finalizing undefined entities -- odd text in 6.6.4

dick.hendrickson at att.net dick.hendrickson
Tue Mar 18 20:10:25 EDT 2008


 
  -------------- Original message from Bill Long <longb at cray.com>: --------------


> 
> 
> Jim Xia wrote:
> >
> > j3-bounces at j3-fortran.org wrote on 03/18/2008 04:00:57 PM:
> >
> > >
> > > How about
> > >
> > >          DEALLOCATE (pointer, stat=istat)
> > >
> > > This would need to be done separately for each pointer; otherwise,
> > > there is no
> > > certainty that each valid target is deallocated.
> > >
> > > Cheers,
> > >
> > > John.
> >
> >
> > That works for pointers assigned to a target that is not eligible for 
> > deallocation.  However in cases where the pointer is un-initialized 
> > and is therefore with garbage value, specifying stat= is not really 
> > helpful.  The DEALLOCATE statement may cause the program to die.
> >
> 
> Really??  My interpretation has been that including the stat= specifier 
> should prevent the program from aborting.
> 
> If the user really wants to deallocate a pointer's target in a FINAL 
> routine, then John's scheme seems reasonable.  If he wants to do 
> something else, like dump the values to a saved location before deleting 
> the target, then there are still issues.
> 
> This exchange prompted me to read clause 6.6.4 STAT= specifier in 
> 08-007r2.  The end of paragraph 3 seems odd.  It says "In either case, 
> each  has a processor-dependent status:"  which is 
> followed by a list of 3 cases that seem to cover all the bases and allow 
> for no processor-dependence at all.  This is dutifully duplicated in 
> Annex A.  What processor-dependence is being specified here??   
> 
The problem occurs with
    deallocate (a,b,c, stat=j)

If there is a problem with the deallocation of b, what is the status of
a and c?  There's no left-to-right rule for deallocation nor no rule 
about continuing with the deallocation after a problem.

Dick Hendrickson
> Cheers,
> Bill
> 
> 
> 
> 
> -- 
> 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
> 
>             
> 
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://j3-fortran.org/pipermail/j3/attachments/20080319/91aef392/attachment.html 



More information about the J3 mailing list