diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-01-18 11:24:24 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-03-06 18:11:31 +0000 |
commit | 4a270568d93263e4970099456b4efb58466134a6 (patch) | |
tree | 826ed6321c654560d167c5cf693f1c22bc9ea1da /gdb/testsuite | |
parent | 067630bdb553bb889104e3b064e4551531ddcedc (diff) | |
download | gdb-4a270568d93263e4970099456b4efb58466134a6.zip gdb-4a270568d93263e4970099456b4efb58466134a6.tar.gz gdb-4a270568d93263e4970099456b4efb58466134a6.tar.bz2 |
gdb/fortran: Use TYPE_CODE_CHAR for character types
Switch to using TYPE_CODE_CHAR for character types. This appears to
have little impact on the test results as gFortran uses the
DW_TAG_string_type to represent all character variables (as far as I
can see). The only place this has an impact is when the user casts a
variable to a character type, in which case GDB does now use the CHAR
type, and prints the variable as both a value and a character, for
example, before:
(gdb) p ((character) 97)
$1 = 97
and after:
(gdb) p ((character) 97)
$1 = 97 'a'
gdb/ChangeLog:
* f-lang.c (build_fortran_types): Use TYPE_CODE_CHAR for character
types.
gdb/testsuite/ChangeLog:
* gdb.fortran/type-kinds.exp: Update expected results.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.fortran/type-kinds.exp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b5599e4..87c491f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-03-06 Andrew Burgess <andrew.burgess@embecosm.com> + * gdb.fortran/type-kinds.exp: Update expected results. + +2019-03-06 Andrew Burgess <andrew.burgess@embecosm.com> + * gdb.fortran/type-kinds.exp: Test new integer type kind. 2019-03-06 Andrew Burgess <andrew.burgess@embecosm.com> diff --git a/gdb/testsuite/gdb.fortran/type-kinds.exp b/gdb/testsuite/gdb.fortran/type-kinds.exp index 198ac58..b5d4e7b 100644 --- a/gdb/testsuite/gdb.fortran/type-kinds.exp +++ b/gdb/testsuite/gdb.fortran/type-kinds.exp @@ -38,7 +38,7 @@ proc test_cast_1_to_type_kind {base_type type_kind cast_result size_result} { # Test parsing of `(kind=N)` type modifiers. proc test_basic_parsing_of_type_kinds {} { - test_cast_1_to_type_kind "character" "1" "1" "1" + test_cast_1_to_type_kind "character" "1" "1 '\\\\001'" "1" test_cast_1_to_type_kind "complex" "4" "\\(1,0\\)" "8" test_cast_1_to_type_kind "complex" "8" "\\(1,0\\)" "16" |