aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch10.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2023-03-03 09:46:34 -0500
committerMarc Poulhiès <poulhies@adacore.com>2023-05-25 09:44:16 +0200
commitcf6ddb553085c74d75eabac7be9dbc82dda87f0a (patch)
treec7bb5ecedb6378cea5f8ffa14e753964da7b050d /gcc/ada/sem_ch10.adb
parent211b562b74bdad3d3c3571517699f35540be8391 (diff)
downloadgcc-cf6ddb553085c74d75eabac7be9dbc82dda87f0a.zip
gcc-cf6ddb553085c74d75eabac7be9dbc82dda87f0a.tar.gz
gcc-cf6ddb553085c74d75eabac7be9dbc82dda87f0a.tar.bz2
ada: Set Is_Not_Self_Hidden flag in more cases
More work-in-progress for changing E_Void checks to the flag. gcc/ada/ * sem_ch9.adb (Analyze_Protected_Type_Declaration): Set the flag for protected types. (Analyze_Single_Protected_Declaration): Likewise, for singleton protected objects. (Analyze_Task_Type_Declaration): Set the flag for task types. (Analyze_Single_Task_Declaration): Likewise, for singleton task objects. * sem_ch10.adb (Decorate_Type): Set the flag for types treated as incomplete. (Build_Shadow_Entity): Set the flag for shadow entities. (Decorate_State): Set the flag for an abstract state. (Build_Limited_Views): Set the flag for limited view of package. * sem_attr.adb (Check_Not_Incomplete_Type): Disable the check when this is a current instance.
Diffstat (limited to 'gcc/ada/sem_ch10.adb')
-rw-r--r--gcc/ada/sem_ch10.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index c9bbd77..a6cbe46 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -3306,6 +3306,7 @@ package body Sem_Ch10 is
-- incomplete type, and carries the corresponding attributes.
Mutate_Ekind (Ent, E_Incomplete_Type);
+ Set_Is_Not_Self_Hidden (Ent);
Set_Etype (Ent, Ent);
Set_Full_View (Ent, Empty);
Set_Is_First_Subtype (Ent);
@@ -5989,7 +5990,8 @@ package body Sem_Ch10 is
Mutate_Ekind (Shadow, Ekind (Ent));
end if;
- Set_Is_Internal (Shadow);
+ Set_Is_Not_Self_Hidden (Shadow);
+ Set_Is_Internal (Shadow);
Set_From_Limited_With (Shadow);
-- Add the new shadow entity to the limited view of the package
@@ -6056,6 +6058,7 @@ package body Sem_Ch10 is
procedure Decorate_State (Ent : Entity_Id; Scop : Entity_Id) is
begin
Mutate_Ekind (Ent, E_Abstract_State);
+ Set_Is_Not_Self_Hidden (Ent);
Set_Etype (Ent, Standard_Void_Type);
Set_Scope (Ent, Scop);
Set_Encapsulating_State (Ent, Empty);
@@ -6416,11 +6419,12 @@ package body Sem_Ch10 is
raise Program_Error;
end case;
- -- The withed unit may not be analyzed, but the with calause itself
+ -- The withed unit may not be analyzed, but the with clause itself
-- must be minimally decorated. This ensures that the checks on unused
-- with clauses also process limieted withs.
Mutate_Ekind (Pack, E_Package);
+ Set_Is_Not_Self_Hidden (Pack);
Set_Etype (Pack, Standard_Void_Type);
if Is_Entity_Name (Nam) then