From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6814 invoked by alias); 14 Sep 2010 07:32:18 -0000 Received: (qmail 6803 invoked by uid 22791); 14 Sep 2010 07:32:17 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,T_LOTS_OF_MONEY,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mms1.broadcom.com (HELO mms1.broadcom.com) (216.31.210.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Sep 2010 07:32:10 +0000 Received: from [10.16.192.224] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Tue, 14 Sep 2010 00:31:59 -0700 X-Server-Uuid: 02CED230-5797-4B57-9875-D5D2FEE4708A Received: from SJEXCHCCR02.corp.ad.broadcom.com ([10.16.192.131]) by SJEXCHHUB01.corp.ad.broadcom.com ([10.16.192.224]) with mapi; Tue, 14 Sep 2010 00:31:59 -0700 From: "Andrew Burgess" To: "Mathew Yeates" cc: "Jan Kratochvil" , "gdb@sourceware.org" Date: Tue, 14 Sep 2010 07:32:00 -0000 Subject: RE: multidimensional fortran arrays Message-ID: <89AE14E37D740B4796DC14566DF6325ECB7E0D56CC@SJEXCHCCR02.corp.ad.broadcom.com> References: <20100903054655.GA25904@host1.dyn.jankratochvil.net> <89AE14E37D740B4796DC14566DF6325ECB7E034783@SJEXCHCCR02.corp.ad.broadcom.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00084.txt.bz2 > On Tue, Sep 14, 2010 at 00:14, Mathew Yeates >=20 > uh oh. Doesn't seem to work for dimensions greater than 2. Could you attach a test program, steps to compile, and the gdb commands and= output please. The following test program: program a integer :: foo1 (2) integer :: foo2 (2,3) integer :: foo3 (2,3,4) integer :: foo4 (2,3,4,5) integer :: foo5 (2,3,4,5,6) integer :: foo6 (2,3,4,5,6,7) foo1 (:) =3D 10 foo2 (:, :) =3D 10 foo3 (:, :, :) =3D 10 foo4 (:, :, :, :) =3D 10 foo5 (:, :, :, :, :) =3D 10 foo6 (:, :, :, :, :, :) =3D 10 foo1 (2) =3D 20 foo2 (2,3) =3D 20 foo3 (2,3,4) =3D 20 foo4 (2,3,4,5) =3D 20 foo5 (2,3,4,5,6) =3D 20 foo6 (2,3,4,5,6,7) =3D 20 foo1 (2) =3D 20 ! Stop on line 20 end Behaves like this with a patched gdb: Reading symbols from /home/andrew/gdb-bug/myprog.x...done. (gdb) b 20 Breakpoint 1 at 0x8048847: file a.f90, line 20. (gdb) r Starting program: /home/andrew/gdb-bug/myprog.x=20 Breakpoint 1, a () at a.f90:20 20 foo1 (2) =3D 20 ! Stop on line 20 (gdb) p foo6(2,3,4,5,6,7) $3 =3D 20 (gdb) p foo1(2) $4 =3D 20 (gdb) So I suspect we're trying to do different things. Cheers, Andrew