]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix crash on declare expression in contract on access to subprogram type
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 20 Jan 2026 09:09:23 +0000 (10:09 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 25 May 2026 08:28:12 +0000 (10:28 +0200)
As documented at the end of gen_il-gen-gen_entities.adb, E_Subprogram_Type
is part of Scope_Kind but, unlike what is said, it lacks Scope_Depth_Value.

gcc/ada/ChangeLog:

* gen_il-gen-gen_entities.adb (E_Subprogram_Type): Add the missing
Scope_Depth_Value field.

gcc/ada/gen_il-gen-gen_entities.adb

index bb1dd7a944161994f8a92bab6480e9b9218d122a..2d358929b5ffe569d3b71bdc31f3eb749387791b 100644 (file)
@@ -942,7 +942,8 @@ begin -- Gen_IL.Gen.Gen_Entities
         Sm (Extra_Accessibility_Of_Result, Node_Id),
         Sm (Extra_Formals, Node_Id),
         Sm (Extra_Formals_Known, Flag),
-        Sm (Needs_No_Actuals, Flag)));
+        Sm (Needs_No_Actuals, Flag),
+        Sm (Scope_Depth_Value, Unat)));
 
    Ab (Overloadable_Kind, Entity_Kind,
        (Sm (Renamed_Or_Alias, Node_Id),