]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix late extra formals creation
authorRonan Desplanques <desplanques@adacore.com>
Tue, 14 Mar 2023 09:01:06 +0000 (10:01 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 26 May 2023 07:29:15 +0000 (09:29 +0200)
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.

gcc/ada/sem_ch6.adb

index 6df1c8dedd35e1f7d9fe1840a0dd894c37776081..c58a5488cd242c85eb6a52cd0fc6500345ed9389 100644 (file)
@@ -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;