summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-09 08:58:02 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-09 08:58:02 +0000
commit9172ac9a5ea3e606d0b464ebd4beba0523d4d0bd (patch)
tree4b0d4dca2f06c192de56977cbd4207b74e1b0e53 /gcc/ada/sem_ch3.adb
parentb63c5ef2ef3d956959b995b7d4853527a7d1f66c (diff)
downloadgcc-9172ac9a5ea3e606d0b464ebd4beba0523d4d0bd.tar.gz
2012-01-09 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 182999 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@183004 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r--gcc/ada/sem_ch3.adb29
1 files changed, 3 insertions, 26 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 50c9d3d6e69..88ef2674dc3 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -16300,34 +16300,11 @@ package body Sem_Ch3 is
then
return True;
- -- If we are in the body of an instantiation, the component is visible
- -- if the parent type is non-private, or in an enclosing scope. The
- -- scope stack is not present when analyzing an instance body, so we
- -- must inspect the chain of scopes explicitly.
+ -- In the body of an instantiation, no need to check for the visibility
+ -- of a component.
elsif In_Instance_Body then
- if not Is_Private_Type (Scope (C)) then
- return True;
-
- else
- declare
- S : Entity_Id;
-
- begin
- S := Current_Scope;
- while Present (S)
- and then S /= Standard_Standard
- loop
- if S = Type_Scope then
- return True;
- end if;
-
- S := Scope (S);
- end loop;
-
- return False;
- end;
- end if;
+ return True;
-- If the component has been declared in an ancestor which is currently
-- a private type, then it is not visible. The same applies if the