diff options
Diffstat (limited to 'gcc/ada/sem_ch7.adb')
| -rw-r--r-- | gcc/ada/sem_ch7.adb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb index 4edfee8..7c408bf 100644 --- a/gcc/ada/sem_ch7.adb +++ b/gcc/ada/sem_ch7.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2003, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2004, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1652,6 +1652,17 @@ package body Sem_Ch7 is Set_Is_Immediately_Visible (Id, False); + -- If this is a private type with a full view (for example a local + -- subtype of a private type declared elsewhere), ensure that the + -- full view is also removed from visibility: it may be exposed when + -- swapping views in an instantiation. + + if Is_Type (Id) + and then Present (Full_View (Id)) + then + Set_Is_Immediately_Visible (Full_View (Id), False); + end if; + if Is_Tagged_Type (Id) and then Ekind (Id) = E_Record_Type then Check_Abstract_Overriding (Id); end if; |
