This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFA] PR gdb/648


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  <dsl@sources.redhat.com>
>  
>         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.
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]