From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 945 invoked by alias); 23 Nov 2010 19:10:39 -0000 Received: (qmail 928 invoked by uid 22791); 23 Nov 2010 19:10:38 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Nov 2010 19:10:22 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oANJAKtR018979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 23 Nov 2010 14:10:20 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oANJAFv8027147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 23 Nov 2010 14:10:19 -0500 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id oANJAESB028664; Tue, 23 Nov 2010 20:10:14 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oANJAA1u028663; Tue, 23 Nov 2010 20:10:10 +0100 Date: Tue, 23 Nov 2010 19:10:00 -0000 From: Jan Kratochvil To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Multi-dimensional Fortran arrays issue PR11104 Message-ID: <20101123191009.GA28613@host0.dyn.jankratochvil.net> References: <89AE14E37D740B4796DC14566DF6325ECB7E173182@SJEXCHCCR02.corp.ad.broadcom.com> <89AE14E37D740B4796DC14566DF6325ECB7F0C2B39@SJEXCHCCR02.corp.ad.broadcom.com> <20101018211952.GA16206@host1.dyn.jankratochvil.net> <89AE14E37D740B4796DC14566DF6325ECB7F1F6E81@SJEXCHCCR02.corp.ad.broadcom.com> <89AE14E37D740B4796DC14566DF6325ECB7F8F140B@SJEXCHCCR02.corp.ad.broadcom.com> <20101123080203.GA9228@host0.dyn.jankratochvil.net> <4CEB91BB.3010104@broadcom.com> <20101123172324.GA10138@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101123172324.GA10138@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00367.txt.bz2 On Tue, 23 Nov 2010 18:23:24 +0100, Jan Kratochvil wrote: > dimension a(10) > call sub(a,10) > end > subroutine sub(a,n) > dimension a(n) > a(5) = 5 > end > > (gdb) b 6 > (gdb) run > (gdb) p a(5) > Subscript number 1 out of bounds, range 1 to 1 BTW I intended to show it for arrays with undefined length such as: dimension a(10) call sub(a,10) end subroutine sub(a) dimension a(*) a(5) = 5 end FSF GDB recognizes the dynamic length (former example) as undefined length type = real(kind=4) (*) while FSF GDB recognizes the undefined length (latter example) as -1 type = real(kind=4) (-1) which does not work in any case. For VLA GDB the former example gets the correct length type = real(kind=4) (10) while VLA GDB recognizes the undefined length correctly: type = real(kind=4) (*) So that your patch could be compatible with both. Thanks, Jan