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.
This commit is contained in:
Andrew Burgess 2019-03-07 16:53:54 +00:00
parent f1fdc96066
commit bc68014d16
9 changed files with 45 additions and 24 deletions

View file

@ -440,4 +440,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
error (_("Invalid type code (%d) in symbol table."), TYPE_CODE (type));
break;
}
if (TYPE_IS_ALLOCATABLE (type))
fprintf_filtered (stream, ", allocatable");
}