[Ada] Refine generation of range checks to happen in front end
commit948071faa6c0c6566056e0cb7b0a41c6c4b0ae79
authorEd Schonberg <schonberg@adacore.com>
Tue, 31 Jul 2018 09:56:36 +0000 (31 09:56 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 31 Jul 2018 09:56:36 +0000 (31 09:56 +0000)
tree4b8b435d7b8c68e167d1c201cb17bac9e4f6b1be
parent51d4bdfb567c86de722ac5a72b79c8f51209228c
[Ada] Refine generation of range checks to happen in front end

2018-07-31  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* exp_attr.adb (Expand_Attribute, case Fixed_Value): Set the
base type of the result to ensure that proper overflow and range
checks are generated.  If the target is a fixed-point tyoe,
generate the required overflow and range checks explicitly,
rather than relying on Apply_Type_Conversion_Checks, which might
simply set the Do_Range_Check flag and rely on the backend to
add the check.

From-SVN: r263104
gcc/ada/ChangeLog
gcc/ada/exp_attr.adb