[Ada] No range check on fixed point to integer conversion
authorArnaud Charlet <charlet@adacore.com>
Mon, 29 Jun 2020 08:22:35 +0000 (04:22 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 19 Oct 2020 09:53:37 +0000 (05:53 -0400)
commit17ea7fad2830423188e2055708bb2d4a983c33bc
tree362937098d75ee7c5ab5c986f531afa118fc4697
parenta6272b85b5f624c5633af243bdf191b8089c892e
[Ada] No range check on fixed point to integer conversion

gcc/ada/

* checks.adb (Apply_Type_Conversion_Checks): Minor code clean
up.
* exp_ch4.adb (Discrete_Range_Check): Optimize range checks.
Update comments.
(Expand_N_Type_Conversion): Generate range check when rewriting
a type conversion if needed. Add assertion.
* exp_ch6.adb (Expand_Simple_Function_Return): Minor code clean
up.
* sem_res.adb (Resolve_Type_Conversion): Apply range check when
needed.  Update comments.
gcc/ada/checks.adb
gcc/ada/exp_ch4.adb
gcc/ada/exp_ch6.adb
gcc/ada/sem_res.adb