aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch7.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch7.adb')
-rw-r--r--gcc/ada/sem_ch7.adb11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb
index 644a0de..ada3a2b 100644
--- a/gcc/ada/sem_ch7.adb
+++ b/gcc/ada/sem_ch7.adb
@@ -2221,9 +2221,16 @@ package body Sem_Ch7 is
-- swap them out in End_Package_Scope.
Replace_Elmt (Priv_Elmt, Full_View (Priv));
+
+ -- Ensure that both views of the dependent private subtype are
+ -- immediately visible if within some open scope.
+
+ if In_Open_Scopes (Scope (Full_View (Priv))) then
+ Set_Is_Immediately_Visible (Priv);
+ Set_Is_Immediately_Visible (Full_View (Priv));
+ end if;
+
Exchange_Declarations (Priv);
- Set_Is_Immediately_Visible
- (Priv, In_Open_Scopes (Scope (Priv)));
Set_Is_Potentially_Use_Visible
(Priv, Is_Potentially_Use_Visible (Node (Priv_Elmt)));