From: Arnaud Charlet Date: Fri, 20 Nov 2020 15:18:22 +0000 (-0500) Subject: [Ada] Fix compile time evaluation of shift intrinsics X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=415791cf5c906cceff4fc444c3f5795e636ed6ab;p=gcc.git [Ada] Fix compile time evaluation of shift intrinsics gcc/ada/ * sem_eval.adb (Fold_Shift): Compute values using the base type. --- diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index b519016b46e..68498e6caaf 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