From 6b1c091238aa00a25346266ae2aece880f749c3a Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 27 Sep 2021 16:37:57 +0200 Subject: [PATCH] [Ada] Simplify code for checks within an initialization procedure gcc/ada/ * sem_util.adb (Compile_Time_Constraint_Error): Simplify getting the type of the first formal parameter. --- gcc/ada/sem_util.adb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 20e4395..63d0217d 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -6590,9 +6590,7 @@ package body Sem_Util is if Inside_Init_Proc then declare Init_Proc_Type : constant Entity_Id := - Entity (Parameter_Type (First - (Parameter_Specifications - (Parent (Current_Scope_No_Loops))))); + Etype (First_Formal (Current_Scope_No_Loops)); Conc_Typ : constant Entity_Id := (if Present (Init_Proc_Type) -- 2.7.4