From 96df3e28b835ccb5804bcca96f417761e5e8be67 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 11 Feb 2021 13:34:06 +0000 Subject: gdb/fortran: support ALLOCATED builtin Add support for the ALLOCATED keyword to the Fortran expression parser. gdb/ChangeLog: * f-exp.y (f77_keywords): Add allocated. * f-lang.c (evaluate_subexp_f): Handle UNOP_FORTRAN_ALLOCATED. (operator_length_f): Likewise. (print_subexp_f): Likewise. (dump_subexp_body_f): Likewise. (operator_check_f): Likewise. * std-operator.def (UNOP_FORTRAN_ALLOCATED): New operator. gdb/testsuite/ChangeLog: * gdb.fortran/allocated.exp: New file. * gdb.fortran/allocated.f90: New file. --- gdb/f-exp.y | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/f-exp.y') diff --git a/gdb/f-exp.y b/gdb/f-exp.y index 00f0df3..e95a2c9 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -1046,6 +1046,7 @@ static const struct token f77_keywords[] = { "cmplx", BINOP_INTRINSIC, BINOP_FORTRAN_CMPLX, false }, { "lbound", UNOP_OR_BINOP_INTRINSIC, FORTRAN_LBOUND, false }, { "ubound", UNOP_OR_BINOP_INTRINSIC, FORTRAN_UBOUND, false }, + { "allocated", UNOP_INTRINSIC, UNOP_FORTRAN_ALLOCATED, false }, }; /* Implementation of a dynamically expandable buffer for processing input -- cgit v1.1