It is simpler to access the type of first formal using semantic instead
of syntactic query. Behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
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
--- 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)