diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-31 12:26:19 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-31 12:26:19 +0000 |
commit | 719597478b507d1c4f83918e210870a94bc67b7f (patch) | |
tree | 9cb2ffd0f833fe97277a9207f023a1eef322dba5 /gcc/ada/exp_attr.adb | |
parent | 49c538e27390135d462b408bcaa176f2b919a68c (diff) | |
download | gcc-719597478b507d1c4f83918e210870a94bc67b7f.tar.gz |
2014-07-31 Ed Schonberg <schonberg@adacore.com>
* sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
* sem_util.adb (Find_Specific_Type): If type is untagged private,
retrieve full view so that primitive operations can be located.
* exp_disp.adb Move Find_Specific_Type to sem_util.
* exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
Find_Specific_Type to locate primitive equality.
* exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
type does not require initialization.
* exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
body all visibility is established, and the enclosing package
declarations must not be installed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213345 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_attr.adb')
-rw-r--r-- | gcc/ada/exp_attr.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 9bdf92fef01..97ed8874b51 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -106,6 +106,8 @@ package body Exp_Attr is -- We suppress checks for array/record reads, since the rule is that these -- are like assignments, out of range values due to uninitialized storage, -- or other invalid values do NOT cause a Constraint_Error to be raised. + -- If we are within an instance body all visibility has been established + -- already and there is no need to install the package. procedure Expand_Access_To_Protected_Op (N : Node_Id; @@ -630,6 +632,11 @@ package body Exp_Attr is if Is_Hidden (Arr) and then not In_Open_Scopes (Scop) and then Ekind (Scop) = E_Package + + -- If we are within an instance body, then all visibility has been + -- established already and there is no need to install the package. + + and then not In_Instance_Body then Push_Scope (Scop); Install_Visible_Declarations (Scop); |