[Ada] Eliminate redundant overflow checks for conversions from fixed-point
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 23 Jul 2019 08:13:26 +0000 (08:13 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 23 Jul 2019 08:13:26 +0000 (08:13 +0000)
commita7191e01187b6ff6429699f09fed8f3fbb018b74
tree932336e21fd305ec8e1da336789d58030323270d
parentf9534f4bd63c9f4be7816f0f9bd8a5feeded5821
[Ada] Eliminate redundant overflow checks for conversions from fixed-point

This eliminates redundant overflow checks that are generated for
conversions from fixed-point to integer types when range checks are also
enabled (which is the default), as the former checks are subsumed into
the latter checks.

No functional changes.

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

gcc/ada/

* checks.adb (Activate_Overflow_Check): Remove redundant
argument.
* exp_ch4.adb (Discrete_Range_Check): Reset the overflow flag.
(Expand_N_Type_Conversion): Do not reset it here.

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