From: Joel Brobecker Date: Fri, 13 Mar 2009 02:15:01 +0000 (+0000) Subject: * ada-lang.c (ada_evaluate_subexp) : make sure to X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9c2be529f5eba8ee2b799003b6c2dc15971954d1;p=binutils-gdb.git * ada-lang.c (ada_evaluate_subexp) : make sure to promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 93b6b555dd9..4307293898e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-03-12 Joel Brobecker + + * ada-lang.c (ada_evaluate_subexp) : make sure to + promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS. + 2009-03-12 Joel Brobecker * ada-tasks.c (ada_task_is_alive): Move up and make static. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index aa5deceb9b5..f1a42680fd9 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -8458,7 +8458,10 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, goto nosideret; else if (noside == EVAL_AVOID_SIDE_EFFECTS && (op == BINOP_DIV || op == BINOP_REM || op == BINOP_MOD)) - return value_zero (value_type (arg1), not_lval); + { + binop_promote (exp->language_defn, exp->gdbarch, &arg1, &arg2); + return value_zero (value_type (arg1), not_lval); + } else { type = builtin_type (exp->gdbarch)->builtin_double;