aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-02-27 17:02:14 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-09 04:09:02 -0400
commitdc8adf598fb3a7d6086b69e02007098bd7555d16 (patch)
treeee5aa14858a340a166ff8a53a80310d8037bedc1
parent11381028a623f939cb7148d908e75ec624e00085 (diff)
downloadgcc-dc8adf598fb3a7d6086b69e02007098bd7555d16.zip
gcc-dc8adf598fb3a7d6086b69e02007098bd7555d16.tar.gz
gcc-dc8adf598fb3a7d6086b69e02007098bd7555d16.tar.bz2
[Ada] Remove bypass for instance bodies from Is_Visible_Component
2020-06-09 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch3.adb (Is_Visible_Component): Do not special-case bodies of instances.
-rw-r--r--gcc/ada/sem_ch3.adb33
1 files changed, 0 insertions, 33 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 7882cb8..2c04084 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -18762,39 +18762,6 @@ package body Sem_Ch3 is
then
return True;
- -- In the body of an instantiation, check the visibility of a component
- -- in case it has a homograph that is a primitive operation of a private
- -- type which was not visible in the generic unit.
-
- -- Should Is_Prefixed_Call be propagated from template to instance???
-
- elsif In_Instance_Body then
- if not Is_Tagged_Type (Original_Type)
- or else not Is_Private_Type (Original_Type)
- then
- return True;
-
- else
- declare
- Subp_Elmt : Elmt_Id;
-
- begin
- Subp_Elmt := First_Elmt (Primitive_Operations (Original_Type));
- while Present (Subp_Elmt) loop
-
- -- The component is hidden by a primitive operation
-
- if Chars (Node (Subp_Elmt)) = Chars (C) then
- return False;
- end if;
-
- Next_Elmt (Subp_Elmt);
- end loop;
-
- return True;
- end;
- end if;
-
-- 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
-- component's containing type is not in an open scope and the original