r260741 - in /trunk/gcc: ada/ChangeLog ada/sem_...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Fri May 25 09:05:00 GMT 2018


Author: pmderodat
Date: Fri May 25 09:05:21 2018
New Revision: 260741

URL: https://gcc.gnu.org/viewcvs?rev=260741&root=gcc&view=rev
Log:
[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.

Added:
    trunk/gcc/testsuite/gnat.dg/fixedpnt4.adb
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_res.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list