gdb/fortran: Additional builtin procedures
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 13 Feb 2019 17:10:18 +0000 (17:10 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 30 Apr 2019 09:10:24 +0000 (10:10 +0100)
commitb6d03bb2b65ac5c919f1d08674bbaa2a9bfb2d0c
treeba4019eaf0e387569cb2f165b226b45140fff8c3
parent83228e93efa82f84a132f7cec44d0e760d4ad22b
gdb/fortran: Additional builtin procedures

Add some additional builtin procedures for Fortran, these are MOD,
CEILING, FLOOR, MODULO, and CMPLX.

gdb/ChangeLog:

* f-exp.y (BINOP_INTRINSIC): New token.
(exp): New parser rule handling BINOP_INTRINSIC.
(f77_keywords): Add new builtin procedures.
* f-lang.c (evaluate_subexp_f): Handle BINOP_MOD, UNOP_FORTRAN_CEILING,
UNOP_FORTRAN_FLOOR, BINOP_FORTRAN_MODULO, BINOP_FORTRAN_CMPLX.
(operator_length_f): Handle UNOP_FORTRAN_CEILING,
UNOP_FORTRAN_FLOOR, BINOP_FORTRAN_MODULO, BINOP_FORTRAN_CMPLX.
(print_unop_subexp_f): New function.
(print_binop_subexp_f): New function.
(print_subexp_f): Handle UNOP_FORTRAN_CEILING, UNOP_FORTRAN_FLOOR,
BINOP_FORTRAN_MODULO, BINOP_FORTRAN_CMPLX.
(dump_subexp_body_f): Likewise.
(operator_check_f): Likewise.
* fortran-operator.def: Add UNOP_FORTRAN_CEILING, UNOP_FORTRAN_FLOOR,
BINOP_FORTRAN_MODULO, BINOP_FORTRAN_CMPLX

gdb/testsuite/ChangeLog:

* gdb.fortran/intrinsics.exp: Extend to cover MOD, CEILING, FLOOR,
MODULO, CMPLX.
gdb/ChangeLog
gdb/f-exp.y
gdb/f-lang.c
gdb/fortran-operator.def
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/intrinsics.exp