[Ada] Fix small inefficiency in previous change to expander
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 26 Apr 2020 10:46:03 +0000 (12:46 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 18 Jun 2020 09:08:37 +0000 (05:08 -0400)
commit2ab42c70a62fe10f40a623adf48002ac8cdb9bf8
tree678afe6359395f39320bc4b5a19193c1d7bd649a
parent424ce99fb53c994ba56f99e4b5513dc19e897463
[Ada] Fix small inefficiency in previous change to expander

2020-06-18  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_ch4.adb (Get_Size_For_Range): Only make sure to return a
size lower than that of the original type if possible.
* libgnat/s-rannum.adb (Random_Discrete): Back out optimization
added for 32-bit types.
gcc/ada/exp_ch4.adb
gcc/ada/libgnat/s-rannum.adb