From efbecbc143f19cb308ae220fb386505f41ff4bc3 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 21 Jan 2019 15:10:55 +0000 Subject: gdb/fortran: Handle older TYPE*SIZE typenames This patch adds support for the older TYPE*SIZE typenames that are still around in older code. For implementation this currently reuses the kind mechanism, as under gFortran the kind number is equivalent to the size, however, this is not necessarily true for all compilers. If the rules for other compilers are better understood then this code might need to be improved slightly to allow for a distinction between size and kind, however, adding this extra complexity now seems pointless. gdb/ChangeLog: * f-exp.y (direct_abs_decl): Handle TYPE*SIZE type names. gdb/testsuite/ChangeLog: * gdb.fortran/type-kinds.exp: Extend to cover TYPE*SIZE cases. --- gdb/f-exp.y | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/f-exp.y') diff --git a/gdb/f-exp.y b/gdb/f-exp.y index 88c685a..7e838b0 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -570,6 +570,8 @@ direct_abs_decl: '(' abs_decl ')' { $$ = $2; } | '(' KIND '=' INT ')' { push_kind_type ($4.val, $4.type); } + | '*' INT + { push_kind_type ($2.val, $2.type); } | direct_abs_decl func_mod { push_type (tp_function); } | func_mod -- cgit v1.1