automatic arrays in g77

Martin Kahlert
Tue Feb 8 22:56:00 GMT 2000

Quoting Toon Moene (
> Martin Kahlert wrote:
> > how can i tell g77, that a big array (double precision with >= 4097 elements
> > in my particular case) should be put on the stack instead of static storage?
> > 4096 seems to be the limit for g77.
> Unfortunately, you can't.  It is a compile time (i.e. f/com.c compile
> time) constant (32 Kbytes).
> I have been thinking about trying to make it a compiler switch (i.e. so
> that you could say something like g77 -fstackable-size=NNNN) but I never
> came around tracking down *if* f/com.c's code would allow this to be a
> variable instead of a constant.
Thanks for your quick answer!
What i would prefer is an option like -Mrecursive (Portland Group Compiler
for ix86 Linux) or -stackvar (Sun Solaris compiler) which put all
not explicitly saved locals onto the stack.

Thanks again,

The early bird gets the worm. If you want something else for       
breakfast, get up later.

More information about the Gcc mailing list