automatic arrays in g77

Toon Moene
Tue Feb 8 13:41:00 GMT 2000

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.

Hope this helps,

Toon Moene (
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran:

More information about the Gcc mailing list