r273692 - in /trunk/gcc/ada: ChangeLog checks.a...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Mon Jul 22 13:58:00 GMT 2019
Author: pmderodat
Date: Mon Jul 22 13:58:19 2019
New Revision: 273692
URL: https://gcc.gnu.org/viewcvs?rev=273692&root=gcc&view=rev
Log:
[Ada] Overhaul code implementing conversions involving fixed-point types
This ovehauls the code implementing conversions involving fixed-point
types in the front-end because it leaks the Do_Range_Check flag in
several places to the back-end, which is a violation of the documented
interface between front-end and back-end.
This also does a bit of housekeeping work throughout it in the process.
There should be essentially no functional changes.
2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* checks.adb (Apply_Type_Conversion_Checks): Do not set
Do_Range_Check flag on conversions from fixed-point types
either.
* exp_attr.adb: Add use and with clause for Expander.
(Expand_N_Attribute_Reference) <Fixed_Value, Integer_Value>: Set
the Conversion_OK flag and do not generate overflow/range checks
manually.
* exp_ch4.adb (Expand_N_Qualified_Expression): Remove
superfluous clearing of Do_Range_Check flag.
(Discrete_Range_Check): New procedure to generate a range check
for discrete types.
(Real_Range_Check): Remove redundant local variable and adjust.
Remove useless shortcut. Clear Do_Range_Check flag on all
paths.
(Expand_N_Type_Conversion): Remove redundant test on
Conversion_OK. Call Discrete_Range_Check to generate range
checks on discrete types. Remove obsolete code for
float-to-integer conversions. Add code to generate range checks
for conversions involving fixed-point types.
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/checks.adb
trunk/gcc/ada/exp_attr.adb
trunk/gcc/ada/exp_ch4.adb
More information about the Gcc-cvs
mailing list