[Ada] Spurious error on fixed-point operation whose operands are expressions
This patch fixes a spurious error in a fixed-point operand of a multiplying
operator M when the operand is an adding operation and the context imposes
a different fixed-point type to the result of M.
2018-05-25 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
of a fixed point type and the parent is a multiplying operation,
resolve the operand with its own type because the context will impose a
resulting type on the result of the multiplication by means of
approriate conversion.
gcc/testsuite/
* gnat.dg/fixedpnt4.adb: New testcase.
From-SVN: r260741