[Ada] Missing front-end code for constraint checks on fixed point exprs
authorEd Schonberg <schonberg@adacore.com>
Wed, 26 Sep 2018 09:19:38 +0000 (09:19 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 26 Sep 2018 09:19:38 +0000 (09:19 +0000)
commit241848fd7ac69fd1ff0a17203d824c305a384137
tree67c44fcb4fcad12ad1611fa9be88c2c11ba6ab44
parent2d9a8c0ba10d03608aa2add8cf9f33053ab8c421
[Ada] Missing front-end code for constraint checks on fixed point exprs

This patch ensures that the front-end generates constraint checks for
some operations that previously depended on gigi for the corresponding
check. The patch also resets the Do_Range_Check flag so that it never
appears in the tree presented to gigi.

2018-09-26  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* checks.adb (Apply_Type_Conversion_Checks): Do not generate a
range check on the expression of the conversion if it involves a
fixed-point type, as such conversions are handled specially
during expansion.
* exp_ch4.adb (Expand_N_Type_Conversion): In a conversion from
Fixed to Integer, use the base type of the expression to ensure
that the caller will generate the proper constraint check when
needed.

From-SVN: r264632
gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/ada/exp_ch4.adb