[Ada] Move folding of unchecked conversions from expansion to evaluation
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 30 Nov 2020 15:56:38 +0000 (16:56 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 17 Dec 2020 10:49:22 +0000 (05:49 -0500)
commit4d3a70f2d1fd213ff669bdaf5752615ab871a2c7
tree15dbaff7c8211f0ca668e4472fab27277478b6f1
parent97919732a8ebeb343705966b2ca649d35d3197e9
[Ada] Move folding of unchecked conversions from expansion to evaluation

gcc/ada/

* exp_ch4.adb (Expand_N_Unchecked_Type_Conversion): Remove
folding of discrete values.
* exp_intr.adb (Expand_Unc_Conversion): Analyze, resolve and
evaluate (if possible) calls to instances of
Ada.Unchecked_Conversion after they have been expanded into
N_Unchecked_Type_Conversion.
* sem_eval.adb (Eval_Unchecked_Conversion): Add folding of
discrete values.
gcc/ada/exp_ch4.adb
gcc/ada/exp_intr.adb
gcc/ada/sem_eval.adb