(j3.2006) implicit deallocation in main programs

Robert Corbett robert.corbett
Tue Sep 13 02:38:14 EDT 2011

Oracle's Fortran team received a bug report today
claiming that unsaved allocatable variables in main
programs should not be implicitly deallocated.
Oracle Solaris Studio (OSS) Fortran does implicitly
deallocate unsaved allocatable variables in the main
program if execution reaches the END statement of
the main program.  I think our implementation is
standard conforming, because it is impossible to tell
from within a program that the variable has been
deallocated.  Does anyone think I am incorrect?

Note that we have not yet implemented finalizers,
so we have not yet made the mistake of running the
finalizers when the END statement is reached.

Bob Corbett

More information about the J3 mailing list