summaryrefslogtreecommitdiff
path: root/gdb/f-exp.y
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-02-11 13:34:06 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-02-12 09:22:17 +0000
commit96df3e28b835ccb5804bcca96f417761e5e8be67 (patch)
tree6b09c8d9cb20a88b9cf4081f1814cfafaa86de62 /gdb/f-exp.y
parent17e04eff810ecf1f8392a995876a98361c565ec7 (diff)
downloadbinutils-gdb-96df3e28b835ccb5804bcca96f417761e5e8be67.tar.gz
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.
Diffstat (limited to 'gdb/f-exp.y')
-rw-r--r--gdb/f-exp.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 00f0df34db4..e95a2c974ca 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