r273695 - in /trunk/gcc: ada/ChangeLog ada/exp_...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Mon Jul 22 13:58:00 GMT 2019


Author: pmderodat
Date: Mon Jul 22 13:58:32 2019
New Revision: 273695

URL: https://gcc.gnu.org/viewcvs?rev=273695&root=gcc&view=rev
Log:
[Ada] Fix missing check for no-op conversion to fixed-point type

This plugs a small loophole in the compiler for the case of a
multiplication or a division in a fixed-point type wrapped in a no-op
conversion, e.g. to the same fixed-point type.

The front-end fails to generate a range check for the operation.  This
used to be caught by the back-end, which would generate the range check,
but this is no longer the case because we now make sure to reset the
Do_Range_Check flag in all cases before invoking the back-end.

2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_ch4.adb (Expand_N_Type_Conversion): Beef up comment.
	(Fixup_Universal_Fixed_Operation): Set the base type instead of
	the type of the enclosing type conversion on the operation.

gcc/testsuite/

	* gnat.dg/fixedpnt6.adb: New testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/fixedpnt6.adb
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/exp_ch4.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list