From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30953 invoked by alias); 6 Aug 2004 20:57:41 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 30940 invoked from network); 6 Aug 2004 20:57:40 -0000 Received: from unknown (HELO book.moene.indiv.nluug.nl) (195.109.255.217) by sourceware.org with SMTP; 6 Aug 2004 20:57:40 -0000 Received: from local ([127.0.0.1] helo=moene.indiv.nluug.nl) by book.moene.indiv.nluug.nl with esmtp (Exim 3.36 #1 (Debian)) id 1BtBsz-0000bI-00; Fri, 06 Aug 2004 23:04:21 +0200 Message-ID: <4113F240.30207@moene.indiv.nluug.nl> Date: Fri, 06 Aug 2004 22:40:00 -0000 From: Toon Moene Organization: Moene Computational Physics, Maartensdijk, NL User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.6) Gecko/20040414 Debian/1.6-5 MIME-Version: 1.0 To: bvds@bvds.geneva.edu CC: gcc-help@gcc.gnu.org Subject: Re: Anyone knowlegable about valgrind ? Was: Re: g77 and valgrind error? References: <200408061927.i76JRqik014917@bvds.geneva.edu> <4113E9B8.3070501@moene.indiv.nluug.nl> <200408062043.i76KhNcG004458@bvds.geneva.edu> In-Reply-To: <200408062043.i76KhNcG004458@bvds.geneva.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00061.txt.bz2 bvds@bvds.geneva.edu wrote: >>I do not know anything about valgrind, but the Fortran code is perfectly >>OK. It uses an automatic array x in subroutine fsub that is dimensioned >>using the dummy argument i, which is an extension of Fortran 77, but >>allowed in Fortran 90 and supported by g77. > > Yes, the code itself is OK... > Another detail that I forgot to mention is that the valgrind > error goes away when i=350. Is there anything about memory > allocation in g77 that would change with increasing i? > > I have also put this question to the valgrind people, but > *they* probably don't know much about g77. I wouldn't know why 360 is a "magic number", but g77 doesn't do anything but place the automatic array on the stack. Therefore, we have to deal with 16 * 360 * 360 bytes = slightly over 2 megabytes of stack space. I can't see why this would be a problem (unless other automatic arrays are also dimensioned using `i'. Cheers, -- 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 A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/