https://gcc.gnu.org/g:ec63adfd513a5c3f088fe9776d9c33d4ae0737e8
commit r16-1847-gec63adfd513a5c3f088fe9776d9c33d4ae0737e8 Author: Ronan Desplanques <desplanq...@adacore.com> Date: Wed Apr 16 12:33:11 2025 +0200 ada: Set ekind of loop parameters earlier gcc/ada/ChangeLog: * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set ekind earlier. Diff: --- 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 12b04fd8e880..caba1e215b15 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);