public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dale Johannesen <dalej@apple.com>
To: Toon Moene <toon@moene.indiv.nluug.nl>
Cc: Dale Johannesen <dalej@apple.com>, Robert Dewar <dewar@gnat.com>,
	susukita@postman.riken.go.jp, gcc@gcc.gnu.org
Subject: Re: g77 large array
Date: Wed, 15 Oct 2003 20:49:00 -0000	[thread overview]
Message-ID: <86C842D6-FF3F-11D7-B0DC-000393D76DAA@apple.com> (raw)
In-Reply-To: <3F8D9295.3080909@moene.indiv.nluug.nl>

On Wednesday, October 15, 2003, at 11:31  AM, Toon Moene wrote:
> Dale Johannesen wrote:
>> On Tuesday, October 14, 2003, at 08:00  PM, Robert Dewar wrote:
>>>> 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?
>
>> Actually, most modern Fortran compilers have a switch to control 
>> this.  g77 documents
>> -fautomatic to do what you want.   I haven't tried it; the doc also 
>> claims it is the default, so
>> it may not be working right in your environment, or it may have some 
>> limit on how much
>> stack space it will allocate.
>
> Well, the reason to have a maximum-size-to-put-on-the-stack for arrays 
> when the first release of g77 was made (early '95) was that a lot of 
> the target systems had small stack sizes (by default and as a system 
> wide maximum).  If the compiler just allocated arbitrarily sized 
> arrays on the stack, much more people would have run into segmentation 
> faults than are now.

Sounds like a good place for a compile-time default and command-line 
switch to override.

> However, g77 (like all of GCC) is free software.  You can up the limit 
> yourself (and rebuild the compiler).  The limit is in the file 
> gcc/f/com.c, constant FFECOM_sizeMAXSTACKITEM.
>
> Hope this helps,

Not me; just delurked for a moment to help susukita...let us know what 
you come up with....

  reply	other threads:[~2003-10-15 18:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-15 10:40 Robert Dewar
2003-10-15 17:58 ` Dale Johannesen
2003-10-15 20:32   ` Toon Moene
2003-10-15 20:49     ` Dale Johannesen [this message]
2003-10-16  8:12       ` Susukita Ryutaro
  -- strict thread matches above, loose matches on Subject: below --
2003-10-14  8:30 Susukita Ryutaro
2003-10-14 21:30 ` Toon Moene
2003-10-15  8:30   ` Susukita Ryutaro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86C842D6-FF3F-11D7-B0DC-000393D76DAA@apple.com \
    --to=dalej@apple.com \
    --cc=dewar@gnat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=susukita@postman.riken.go.jp \
    --cc=toon@moene.indiv.nluug.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).