diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2021-02-11 13:34:06 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2021-02-12 09:22:17 +0000 |
commit | 96df3e28b835ccb5804bcca96f417761e5e8be67 (patch) | |
tree | 6b09c8d9cb20a88b9cf4081f1814cfafaa86de62 /gdb/f-exp.y | |
parent | 17e04eff810ecf1f8392a995876a98361c565ec7 (diff) | |
download | gdb-96df3e28b835ccb5804bcca96f417761e5e8be67.zip gdb-96df3e28b835ccb5804bcca96f417761e5e8be67.tar.gz gdb-96df3e28b835ccb5804bcca96f417761e5e8be67.tar.bz2 |
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.y | 1 |
1 files changed, 1 insertions, 0 deletions
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 |