From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18478 invoked by alias); 13 Aug 2004 10:25:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18359 invoked from network); 13 Aug 2004 10:25:36 -0000 Received: from unknown (HELO cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com) (81.105.116.12) by sourceware.org with SMTP; 13 Aug 2004 10:25:36 -0000 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com (8.12.11/8.12.11) with ESMTP id i7DAk6ve022727 for ; Fri, 13 Aug 2004 11:46:06 +0100 Subject: Re: [PATCH/RFA] PR gdb/648 From: David Lecomber To: patches In-Reply-To: <1091830216.4188.23.camel@localhost> References: <1091830216.4188.23.camel@localhost> Content-Type: text/plain Message-Id: <1092393966.22361.19.camel@cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com> Mime-Version: 1.0 Date: Fri, 13 Aug 2004 10:25:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00483.txt.bz2 Hi, Is anyone looking into this -- I can't commit without a go-ahead! Cheers David On Fri, 2004-08-06 at 23:10, David Lecomber wrote: > This is a fix for a long-standing bug with multi-dimensional arrays in > fortran. When printing individual elements of an array, > evaluate_subexp_standard understood the dimensions of the array to be in > the opposite order to that of the whatis or entire array printing. This > led to bug 648, which was present for G77 compiled code, but the problem > was reversed for commercial compilers such as Intel or Portland. > > G77 puts things in row-major order, as far as I can ascertain all other > fortran compilers do column major. This is handled in the dwarf2read > change, and now column major array types are reversed during the reading > to fit with GDB's struct type. > > 2004-08-06 David Lecomber > > Fix PR gdb/648 > * dwarf2read.c (read_array_type): Handle column major arrays > correctly. Assume column major for Fortran except with G77 > compiler. > * eval.c (evaluate_subexp_standard): Assume Fortran arrays are > oriented large to small in type structure. > > > Attached is a test program and test script, should return true for all > comparisons.. > > I'm sure there'll be some comments, so please feel free to suggest some > reformatting! > > David. >