Print

Print


> > *automatic arrays* are deallocated on exit - they cannot be treated as SAVEd
> > (the size may vary from one invocation of the procedure to the next, and is
> > not known at compile-time in any case).
> 
> I see, it makes sense.  But then I wonder what other copilers do, see for
> example g77:  [taken from the info manual]
> 
> `-fno-automatic'
>      Treat each program unit as if the `SAVE' statement was specified
>      for every local variable and array referenced in it.  Does not
>      affect common blocks.  (Some Fortran compilers provide this option
>      under the name `-static'.)
> 
> This seems to imply that this compiler switch forces all automatic objects
> to be allocated on the heap, and not deallocated on exit from the
> subroutine in question. Am I over-interpreting too much here?

I'm no g77 user, but I think it is talking about "normal" variables
(including arrays), not automatic arrays.  The switch is NO AUTOMATIC,
meaning they should not be automatic.  "Automatic" is sometimes used as
an antonym to "static", though "volatile" probably captures the meaning
better.  This has nothing to do with "automatic arrays".


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%