diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-08 07:27:57 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-03-08 07:28:30 -0700 |
commit | eb4c927182a8c935960e8c70a2c2d3ab2c49e21f (patch) | |
tree | 559bbbc177cabb279f79de32a17d493f3990b008 /gdb/f-exp.h | |
parent | 58a76c72648ce1e70bbba8320547a5c4353c48a3 (diff) | |
download | binutils-eb4c927182a8c935960e8c70a2c2d3ab2c49e21f.zip binutils-eb4c927182a8c935960e8c70a2c2d3ab2c49e21f.tar.gz binutils-eb4c927182a8c935960e8c70a2c2d3ab2c49e21f.tar.bz2 |
Implement Fortran associated operations
This implements the Fortran 1- and 2-argument "associated" operations.
gdb/ChangeLog
2021-03-08 Tom Tromey <tom@tromey.com>
* f-lang.c (eval_op_f_associated): New functions.
* f-exp.h (fortran_associated_1arg, fortran_associated_2arg): New
typedefs.
Diffstat (limited to 'gdb/f-exp.h')
-rw-r--r-- | gdb/f-exp.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/f-exp.h b/gdb/f-exp.h index e1d351a..11f403d 100644 --- a/gdb/f-exp.h +++ b/gdb/f-exp.h @@ -57,6 +57,17 @@ extern struct value *eval_op_f_kind (struct type *expect_type, enum noside noside, enum exp_opcode opcode, struct value *arg1); +extern struct value *eval_op_f_associated (struct type *expect_type, + struct expression *exp, + enum noside noside, + enum exp_opcode opcode, + struct value *arg1); +extern struct value *eval_op_f_associated (struct type *expect_type, + struct expression *exp, + enum noside noside, + enum exp_opcode opcode, + struct value *arg1, + struct value *arg2); namespace expr { @@ -72,6 +83,10 @@ using fortran_kind_operation = unop_operation<UNOP_FORTRAN_KIND, using fortran_mod_operation = binop_operation<BINOP_MOD, eval_op_f_mod>; using fortran_modulo_operation = binop_operation<BINOP_FORTRAN_MODULO, eval_op_f_modulo>; +using fortran_associated_1arg = unop_operation<FORTRAN_ASSOCIATED, + eval_op_f_associated>; +using fortran_associated_2arg = binop_operation<FORTRAN_ASSOCIATED, + eval_op_f_associated>; /* The Fortran "complex" operation. */ class fortran_cmplx_operation |