This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: array dimensions
- To: onno at hoitinga dot xs4all dot nl
- Subject: Re: array dimensions
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Thu, 11 Oct 2001 22:01:15 +0200
- CC: gcc-bugs at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <3BC208E0.24105.26216D@localhost>
onno@hoitinga.xs4all.nl wrote:
> I include one program and an output file of a testproblem I have. I need to
> declare an array with a dimension of 400 Mword. Gnu fortran will not allow
> me to do so. Very strange because I want to adres my memory for a FEM
> calculation (at this moment 1Gb core and 1Gb swap space, in the future
> expanding to 4 Gb core and extra swap).
> f77 pipo.f -o pipo
> pipo.f: In program `MAIN__':
> pipo.f:1:
> integer ir(400000000), i
> ^
> Array `ir' at (^) is too large to handle
> make: *** [pipo] Error 1
Yep, this is a well known problem in g77. The error message results
from the compiler detecting an array larger than 2^32 *bits* on a 32-bit
target architecture.
I'll try to come up with a fix for gcc/g77-3.1 (due April 15, 2002) but
I am not sure I will really be able to fix this.
Hope this helps,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)