[Ada] Add support for compile time evaluation of Shift_Right_Arithmetic
authorArnaud Charlet <charlet@adacore.com>
Sun, 21 Jun 2020 08:27:07 +0000 (04:27 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 15 Oct 2020 09:39:08 +0000 (05:39 -0400)
commit8ad6af8fc9f0b5df3a6a5f08a95651014fc946df
tree1d7295a1ee16d22e25356bd364652daedb396e02
parent46a3809b1579cb86574c6ba8e2858a8f369f8786
[Ada] Add support for compile time evaluation of Shift_Right_Arithmetic

gcc/ada/

* sem_eval.adb (Eval_Intrinsic_Call, Fold_Shift): Add support
for Shift_Right_Arithmetic and for signed integers.
* exp_ch4.adb (Expand_N_Op_Rotate_Left,
Expand_N_Op_Rotate_Right, Expand_N_Op_Shift_Left,
Expand_N_Op_Shift_Right_Arithmetic): Minor reformatting and code
cleanup to ensure a consistent handling. Update comments and add
assertion.
gcc/ada/exp_ch4.adb
gcc/ada/sem_eval.adb