From 415791cf5c906cceff4fc444c3f5795e636ed6ab Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 20 Nov 2020 10:18:22 -0500 Subject: [PATCH] [Ada] Fix compile time evaluation of shift intrinsics gcc/ada/ * sem_eval.adb (Fold_Shift): Compute values using the base type. --- gcc/ada/sem_eval.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2