From: Tom Tromey Date: Mon, 8 Mar 2021 14:27:57 +0000 (-0700) Subject: Implement fortran_allocated_operation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f403a4e4a5d6413cf58f7a9ad004b1086fd2254a;p=binutils-gdb.git Implement fortran_allocated_operation This implements the Fortran ALLOCATED intrinsic. gdb/ChangeLog 2021-03-08 Tom Tromey * f-exp.h (eval_op_f_allocated): Declare. (fortran_allocated_operation): New typedef. * f-lang.c (eval_op_f_allocated): No longer static. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d92f16b12d5..856d6ffbf0a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2021-03-08 Tom Tromey + + * f-exp.h (eval_op_f_allocated): Declare. + (fortran_allocated_operation): New typedef. + * f-lang.c (eval_op_f_allocated): No longer static. + 2021-03-08 Tom Tromey * f-lang.c (eval_op_f_associated): New functions. diff --git a/gdb/f-exp.h b/gdb/f-exp.h index 11f403d13ca..81cf3412ee2 100644 --- a/gdb/f-exp.h +++ b/gdb/f-exp.h @@ -1,6 +1,6 @@ /* Definitions for Fortran expressions - Copyright (C) 2020 Free Software Foundation, Inc. + Copyright (C) 2020, 2021 Free Software Foundation, Inc. This file is part of GDB. @@ -68,6 +68,11 @@ extern struct value *eval_op_f_associated (struct type *expect_type, enum exp_opcode opcode, struct value *arg1, struct value *arg2); +extern struct value * eval_op_f_allocated (struct type *expect_type, + struct expression *exp, + enum noside noside, + enum exp_opcode op, + struct value *arg1); namespace expr { @@ -79,6 +84,8 @@ using fortran_floor_operation = unop_operation; using fortran_kind_operation = unop_operation; +using fortran_allocated_operation = unop_operation; using fortran_mod_operation = binop_operation; using fortran_modulo_operation = binop_operation