From ec63adfd513a5c3f088fe9776d9c33d4ae0737e8 Mon Sep 17 00:00:00 2001 From: Ronan Desplanques Date: Wed, 16 Apr 2025 12:33:11 +0200 Subject: [PATCH] ada: Set ekind of loop parameters earlier gcc/ada/ChangeLog: * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set ekind earlier. --- gcc/ada/sem_ch5.adb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 12b04fd8e88..caba1e215b1 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -3149,6 +3149,7 @@ package body Sem_Ch5 is -- Start of processing for Analyze_Loop_Parameter_Specification begin + Mutate_Ekind (Id, E_Loop_Parameter); Enter_Name (Id); -- We always consider the loop variable to be referenced, since the loop @@ -3254,7 +3255,6 @@ package body Sem_Ch5 is -- subsequent analysis of the condition in a quantified -- expression. - Mutate_Ekind (Id, E_Loop_Parameter); return; end; @@ -3317,7 +3317,6 @@ package body Sem_Ch5 is Make_Index (DS, N); end if; - Mutate_Ekind (Id, E_Loop_Parameter); Set_Etype (Id, Etype (DS)); Set_Is_Not_Self_Hidden (Id); -- 2.47.2