]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog
gdb/fortran: Change whitespace when printing arrays
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 21 May 2020 16:35:51 +0000 (17:35 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Sat, 19 Sep 2020 08:48:35 +0000 (09:48 +0100)
commitc8d5abea3d9ad20efb2198ec1b639b8e4dc4d8d3
tree0cd187dc483e428bb5fdfc9d4f643433acdc2757
parent6d81691950f8c4be4a49a85a672255c140e82468
gdb/fortran: Change whitespace when printing arrays

This commit makes the whitespace usage when printing Fortran arrays
more consistent, and more inline with how we print C arrays.

Currently a 2 dimensional Fotran array is printed like this, I find
the marked whitespace unpleasant:

  (( 1, 2, 3) ( 4, 5, 6) )
    ^          ^        ^

After this commit the same array is printed like this:

  ((1, 2, 3) (4, 5, 6))

Which seems more inline with how we print C arrays, in the case of C
arrays we don't add extra whitespace before the first element.

gdb/ChangeLog:

* f-valprint.c (f77_print_array_1): Adjust printing of whitespace
for arrays.

gdb/testsuite/ChangeLog:

* gdb.fortran/array-slices.exp: Update expected results.
* gdb.fortran/class-allocatable-array.exp: Likewise.
* gdb.fortran/multi-dim.exp: Likewise.
* gdb.fortran/vla-type.exp: Likewise.
* gdb.mi/mi-vla-fortran.exp: Likewise.
gdb/ChangeLog
gdb/f-valprint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/array-slices.exp
gdb/testsuite/gdb.fortran/class-allocatable-array.exp
gdb/testsuite/gdb.fortran/multi-dim.exp
gdb/testsuite/gdb.fortran/vla-type.exp
gdb/testsuite/gdb.mi/mi-vla-fortran.exp