diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-03-07 16:53:54 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-04-30 10:36:57 +0100 |
commit | bc68014d16c30a6e90fdf9fc43e98be8cbbead9a (patch) | |
tree | 7a4c9a61b37875f64f7919c9024272e0550fd165 /gdb/gdbtypes.h | |
parent | f1fdc960664c24d911d6189b94e5c054b4bb9053 (diff) | |
download | binutils-gdb-bc68014d16c30a6e90fdf9fc43e98be8cbbead9a.tar.gz |
gdb/fortran: Add allocatable type qualifier
Types in Fortran can have the 'allocatable' qualifier attached to
indicate that memory needs to be explicitly allocated by the user.
This patch extends GDB to show this qualifier when printing types.
Lots of tests results are then updated to include this new qualifier
in the expected results.
gdb/ChangeLog:
* f-typeprint.c (f_type_print_base): Print 'allocatable' type
qualifier.
* gdbtypes.h (TYPE_IS_ALLOCATABLE): Define.
gdb/testsuite/ChangeLog:
* gdb.fortran/vla-datatypes.exp: Update expected results.
* gdb.fortran/vla-ptype.exp: Likewise.
* gdb.fortran/vla-type.exp: Likewise.
* gdb.fortran/vla-value.exp: Likewise.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r-- | gdb/gdbtypes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 147a2de355e..edea6f05474 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -350,6 +350,10 @@ DEF_ENUM_FLAGS_TYPE (enum type_instance_flag_value, type_instance_flags); #define TYPE_IS_REFERENCE(t) \ (TYPE_CODE (t) == TYPE_CODE_REF || TYPE_CODE (t) == TYPE_CODE_RVALUE_REF) +/* * True if this type is allocatable. */ +#define TYPE_IS_ALLOCATABLE(t) \ + (get_dyn_prop (DYN_PROP_ALLOCATED, t) != NULL) + /* * Instruction-space delimited type. This is for Harvard architectures which have separate instruction and data address spaces (and perhaps others). |