From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14639 invoked by alias); 22 Nov 2010 07:10:51 -0000 Received: (qmail 14629 invoked by uid 22791); 22 Nov 2010 07:10:50 -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; Mon, 22 Nov 2010 07:10:45 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAM7AggB003979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Nov 2010 02:10:44 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oAM7AbX8029235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 22 Nov 2010 02:10:41 -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 oAM7AZF2025222; Mon, 22 Nov 2010 08:10:35 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oAM7AUFW025221; Mon, 22 Nov 2010 08:10:30 +0100 Date: Mon, 22 Nov 2010 07: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: <20101122071030.GA17707@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <89AE14E37D740B4796DC14566DF6325ECB7F8F140B@SJEXCHCCR02.corp.ad.broadcom.com> 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/msg00302.txt.bz2 On Wed, 17 Nov 2010 09:44:56 +0100, Andrew Burgess wrote: > tested on x86-64 with no regressions. There is a regression on {x86_64,x86_64-m32,i686}-fedora14-linux-gnu: -PASS: gdb.python/py-value.exp: Test multiple subscript +FAIL: gdb.python/py-value.exp: Test multiple subscript -PASS: gdb.python/py-value.exp: Test multiple subscript +FAIL: gdb.python/py-value.exp: Test multiple subscript This is not a real review, just some simple parts before I get to the core. > + /* Peel of the array indices until we reach the array element type */ > + do > + { > + elt_type = TYPE_TARGET_TYPE (elt_type); > + } > + while (TYPE_CODE (elt_type) == TYPE_CODE_ARRAY); Here should be check_typedef during each peel. I do not have a break reproducer but at least fpc-2.4.2-0.1.rc1.fc15.x86_64 produces such typedef-wrapped arrays and they are valid DWARF: program p; type a = array[1..2] of integer; type b = array[1..2] of a; var v : b; begin v[1, 1] := 1; writeln (v[1, 1]); end. Just Pascal does not use this function but anyway. > +set testfile "multi-dim" > +set srcfile ${testfile}.f90 > +set binfile ${objdir}/${subdir}/${testfile} > + > +if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ > + executable {debug f77}] != ""} { > + return -1 > +} > + > +gdb_exit > +gdb_start > +gdb_reinitialize_dir $srcdir/$subdir > +gdb_load ${binfile} Here could be prepare_for_testing (OK, not used everywhere now). > +gdb_test "break 20" \ > + "Breakpoint.*at.* file .*$srcfile, line 20\\." \ > + "breakpoint at line 20" Here should be gdb_get_line_number call as hardcoded line numbers (20) make later updates difficult. > +gdb_test "continue" \ > + "Breakpoint 2, test \(\).*at.*multi-dim\.f90:20.*" \ > + "Continue to breakpoint" [...] > +gdb_test "print foo" \ > + "\\\$2 = \\(\\( \\( 10, 10\\) \\( 10, 10\\) \\( 10, 10\\) \\) \\( \\( 10, 10\\) \\( 10, 10\\) \\( 10, 10\\) \\) \\( \\( 10, 10\\) \\( 10, 10\\) \\( 10, 10\\) \\) \\( \\( 10, 10\\) \\( 10, 10\\) \\( 10, 20\\) \\) \\)" \ Hardcoded breakpoint and or output ($2) numbers also make later updates difficult. > +gdb_exit Not needed at the testfile end. Thanks, Jan