[COMMITTED] ada: Fix late extra formals creation
Marc Poulhiès
poulhies@adacore.com
Fri May 26 07:35:40 GMT 2023
From: Ronan Desplanques <desplanques@adacore.com>
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.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_ch6.adb | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 6df1c8dedd3..c58a5488cd2 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;
--
2.40.0
More information about the Gcc-patches
mailing list