diff options
author | Arnaud Charlet <charlet@adacore.com> | 2020-11-20 10:18:22 -0500 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-12-14 10:51:53 -0500 |
commit | 415791cf5c906cceff4fc444c3f5795e636ed6ab (patch) | |
tree | 3fb65c9c0d619b54aefa08be3d42a8bbde8dc46e | |
parent | b97b4e6f71da62cae325d1f41610cfb43870a4a1 (diff) | |
download | gcc-415791cf5c906cceff4fc444c3f5795e636ed6ab.zip gcc-415791cf5c906cceff4fc444c3f5795e636ed6ab.tar.gz gcc-415791cf5c906cceff4fc444c3f5795e636ed6ab.tar.bz2 |
[Ada] Fix compile time evaluation of shift intrinsics
gcc/ada/
* sem_eval.adb (Fold_Shift): Compute values using the base type.
-rw-r--r-- | gcc/ada/sem_eval.adb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index b519016..68498e6 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -4785,7 +4785,7 @@ package body Sem_Eval is Static : Boolean := False; Check_Elab : Boolean := False) is - Typ : constant Entity_Id := Etype (Left); + Typ : constant Entity_Id := Base_Type (Etype (Left)); procedure Check_Elab_Call; -- Add checks related to calls in elaboration code |