This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g77 large array


> In this case, two arrays do not need memory at the same time.
> Cannot SUBROUTINE B use the same memory area as A in Fortran compiler,
> even if I do not declare explicitly COMMON I?
> I should write about the machine.

Usually convention in Fortran is to allocate all storage statically. So indeed
one would not expect these two arrays to overlap. I am not sure about the current
Fortran standard, but earlier Fortran standards certainly *allowed* stack allocation
of such arrays, but in practice, static allocation (also certainly allowed) was
so standard, that all compilers do static allocation.

So what you are seeing makes perfect sense


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]