From: Ronan Desplanques Date: Tue, 14 Mar 2023 09:01:06 +0000 (+0100) Subject: ada: Fix late extra formals creation X-Git-Tag: basepoints/gcc-15~8883 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4e907d5ee52fffe7c6fb1256e65eb39c9313379;p=thirdparty%2Fgcc.git ada: Fix late extra formals creation Before this patch, in some situations, a subprogram call could be expanded before the extra formals for the subprogram were created. This patch fixes the problem in those situations. gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Create extra formals in more situations. --- diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 6df1c8dedd35..c58a5488cd24 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -3907,6 +3907,7 @@ package body Sem_Ch6 is and then Serious_Errors_Detected = 0 then Set_Has_Delayed_Freeze (Spec_Id); + Create_Extra_Formals (Spec_Id); Freeze_Before (N, Spec_Id); end if; end if;