From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23705 invoked by alias); 22 Apr 2003 18:37:56 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 23674 invoked from network); 22 Apr 2003 18:37:53 -0000 Received: from unknown (HELO ronispc.chem.mcgill.ca) (132.206.205.91) by sources.redhat.com with SMTP; 22 Apr 2003 18:37:53 -0000 Received: from ronispc.chem.mcgill.ca (IDENT:11@localhost [127.0.0.1]) by ronispc.chem.mcgill.ca (8.12.9/8.12.9) with ESMTP id h3MIbli3012158; Tue, 22 Apr 2003 14:37:47 -0400 Received: (from ronis@localhost) by ronispc.chem.mcgill.ca (8.12.9/8.12.9/Submit) id h3MIbkAC012154; Tue, 22 Apr 2003 14:37:46 -0400 From: David Ronis MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16037.35834.648476.22850@ronispc.chem.mcgill.ca> Date: Tue, 22 Apr 2003 19:39:00 -0000 To: Toon Moene Cc: ronis@onsager.chem.mcgill.ca, "Dr. Juergen Schnack" , gcc@gcc.gnu.org, ronis@ronispc.chem.mcgill.ca Subject: Re: g77 and array limits In-Reply-To: <3EA135E2.1090406@moene.indiv.nluug.nl> References: <3E92CBB5.6020401@uos.de> <16018.53885.323179.591400@ronispc.chem.mcgill.ca> <3E92D431.8010009@uos.de> <16018.59703.503137.174360@ronispc.chem.mcgill.ca> <3E92EAAF.3080907@uos.de> <16018.65162.797851.825184@ronispc.chem.mcgill.ca> <3EA135E2.1090406@moene.indiv.nluug.nl> Reply-To: david.ronis@mcgill.ca X-SW-Source: 2003-04/txt/msg01086.txt.bz2 Toon Moene writes: > David Ronis wrote: > > > Hi Jurgen > > > > Here's a simple test program (that fails) > > > > complex*16 foo(10000,10000) > > integer i,j > > save foo > > > > do i=1,10000 > > do j=1,10000 > > foo(i,j)=i+j > > end do > > end do > > write(*,*)foo(1,1),foo(10000,10000) > > stop > > end > > > > > > with g77 3.2.2 > > > > I get: > > > > g77 -static -O0 -Wall test.f > > test.f: In program `MAIN__': > > test.f:1: > > complex*16 foo(10000,10000) > > I'm sorry, but I don't get this with 3.2.2 (actually, 3.2.2 prerelease > 20021207). > > Please check with -v what the exact version of the compiler is that you > are using. > You are correct. I must have been using gcc-2.95.3; as you said, with 3.2.2 it compiles. However, it still crashes until you reduce the array dimension (as described in the latter part of the original post). With the dimensions as above, the array is equivalent to an array of 400 000 000 reals, and should run if the g77 info page I mentioned is correct. Here's an even simpler test: #define N 10000 real foo(N*N*4) integer i save foo do i=1,N*N*4 foo(i)=i end do write(*,*)foo(1),foo(N*N*4) stop end I compile (with 3.2.2) /usr/bin/g77 -O0 -static -Wall bar.F -static and when I run: a.out Segmentation fault (core dumped) (it works if I cut the size in half) David