From: Piotr Trojanek Date: Mon, 27 Sep 2021 14:37:57 +0000 (+0200) Subject: [Ada] Simplify code for checks within an initialization procedure X-Git-Tag: basepoints/gcc-13~4022 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b1c091238aa00a25346266ae2aece880f749c3a;p=thirdparty%2Fgcc.git [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. --- diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 20e4395e4f3c..63d0217dc6fb 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)