]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix visibility of Taft amendment types
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 8 Oct 2024 20:52:38 +0000 (22:52 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 4 Nov 2024 15:57:55 +0000 (16:57 +0100)
When uninstalling private package declarations we must mark Taft
amendment types hidden, just like we mark other types.

Looking at previous revisions of this code, it is quite clear that this
bug comes from a code evolution and marking types should happen in all
ELSE branches of the enclosing IF statement.

gcc/ada/ChangeLog:

* sem_ch7.adb (Uninstall_Declarations): Mark Taft amendment
types like we mark other types declared in private package
declarations.

gcc/ada/sem_ch7.adb

index 28031b5dbc27eb02011070eec267b127f0a09cd1..07a88fee0ec3e1aeac1ddb8bd0d0efbc7ac14df8 100644 (file)
@@ -3375,6 +3375,9 @@ package body Sem_Ch7 is
                end loop;
             end;
 
+            Set_Is_Hidden (Id);
+            Set_Is_Potentially_Use_Visible (Id, False);
+
          --  For subtypes of private types the frontend generates two entities:
          --  one associated with the partial view and the other associated with
          --  the full view. When the subtype declaration is public the frontend