On Fri, 31 Mar 2000, Malcolm Cohen wrote:
> *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?
If that were the case, I see the problem: how do they treat cases where
different invocations of the same subroutine would need an automatic array
of different sizes? What gives?
Jose
--
Jose L Marin [log in to unmask]
Dept of Mathematics [log in to unmask]
Heriot-Watt University
Edinburgh EH14 4AS, U.K.
Phone: +44 131 451 3717
Fax: +44 131 451 3249
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|