diff options
author | Tom de Vries <tdevries@suse.de> | 2020-08-05 12:31:58 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-08-05 12:31:58 +0200 |
commit | 5555c86d3e85e85d76555acdb955aba062beb02f (patch) | |
tree | f143fead64487d5b67f196ba939c9934a77651a4 | |
parent | 787bbc56d895b452ebfe90bc2b1345ca825fa412 (diff) | |
download | gdb-5555c86d3e85e85d76555acdb955aba062beb02f.zip gdb-5555c86d3e85e85d76555acdb955aba062beb02f.tar.gz gdb-5555c86d3e85e85d76555acdb955aba062beb02f.tar.bz2 |
[gdb] Fix prop->const_val uses in gdbtypes.c
After commit 66d6346b25 "gdb: remove TYPE_DYN_PROP_ADDR", I run into:
...
FAIL: gdb.fortran/class-allocatable-array.exp: print this%_data%b
...
(and 185 more FAILs, all for fortran test-cases).
The commit replaces "!x" by "x != 0".
Fix this by using "x == 0" instead.
Build and tested on x86_64-linux.
gdb/ChangeLog:
2020-08-05 Tom de Vries <tdevries@suse.de>
* gdbtypes.c (type_not_allocated, type_not_associated): Use
"prop->const_val () == 0" instead of "prop->const_val () != 0".
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2cd89b7..0665127 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-08-05 Tom de Vries <tdevries@suse.de> + + * gdbtypes.c (type_not_allocated, type_not_associated): Use + "prop->const_val () == 0" instead of "prop->const_val () != 0". + 2020-08-04 Simon Marchi <simon.marchi@efficios.com> * frame.h (frame_id_p): Return bool. diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 0cd4b19..da1c58c 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4134,7 +4134,7 @@ type_not_allocated (const struct type *type) struct dynamic_prop *prop = TYPE_ALLOCATED_PROP (type); return (prop != nullptr && prop->kind () == PROP_CONST - && prop->const_val () != 0); + && prop->const_val () == 0); } /* Associated status of type TYPE. Return zero if type TYPE is associated. @@ -4146,7 +4146,7 @@ type_not_associated (const struct type *type) struct dynamic_prop *prop = TYPE_ASSOCIATED_PROP (type); return (prop != nullptr && prop->kind () == PROP_CONST - && prop->const_val () != 0); + && prop->const_val () == 0); } /* rank_one_type helper for when PARM's type code is TYPE_CODE_PTR. */ |