(j3.2006) issues with branching out a BLOCK construct

Jim Xia jimxia
Thu Oct 21 10:30:44 EDT 2010

I can't recall if this has been discussed.  Consider the following code

   real, allocatable :: x(:), y(:)[:]
   allocate (x(n))
   allocate (y(n)[*])
   if (condition) GO TO 10

10 .. code to continue

The issue is when the execution branches out of the BLOCK construct, what 
happens to local allocatable variables x and y.  Are they automatically 
deallocated? Does standard say anything about their deallocation?  Also 
what happens to the entities require finalizations?  Does branching out of 
a BLOCK construct considered as termination of a BLOCK construct?

Jim Xia

XL Fortran Compiler Test
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
Phone (905) 413-3444  Tie-line 313-3444
email: jimxia at ca.ibm.com
D2/YF7/8200 /MKM

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20101021/9e22392d/attachment.htm>

More information about the J3 mailing list