aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/exp_ch5.adb14
-rw-r--r--gcc/ada/rtsfind.ads12
2 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 9c7a370..b995577 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -5203,22 +5203,36 @@ package body Exp_Ch5 is
Ent := First_Entity (Pack);
while Present (Ent) loop
+ -- Get_Element_Access function with one parameter called
+ -- Position.
+
if Chars (Ent) = Name_Get_Element_Access
+ and then Ekind (Ent) = E_Function
and then Present (First_Formal (Ent))
and then Chars (First_Formal (Ent)) = Name_Position
and then No (Next_Formal (First_Formal (Ent)))
then
+ pragma Assert (No (Fast_Element_Access_Op));
Fast_Element_Access_Op := Ent;
+ -- Next or Prev procedure with one parameter called
+ -- Position.
+
elsif Chars (Ent) = Name_Step
and then Ekind (Ent) = E_Procedure
+ and then Present (First_Formal (Ent))
+ and then Chars (First_Formal (Ent)) = Name_Position
+ and then No (Next_Formal (First_Formal (Ent)))
then
+ pragma Assert (No (Fast_Step_Op));
Fast_Step_Op := Ent;
elsif Chars (Ent) = Name_Reference_Control_Type then
+ pragma Assert (No (Reference_Control_Type));
Reference_Control_Type := Ent;
elsif Chars (Ent) = Name_Pseudo_Reference then
+ pragma Assert (No (Pseudo_Reference));
Pseudo_Reference := Ent;
end if;
diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads
index 280e2bd..1270955 100644
--- a/gcc/ada/rtsfind.ads
+++ b/gcc/ada/rtsfind.ads
@@ -540,13 +540,11 @@ package Rtsfind is
-- value is required syntactically, but no real entry is required or
-- needed. Use of this value will cause a fatal error in an RTE call.
- -- Note that under no circumstances can any of these entities be defined
- -- more than once in a given package, i.e. no overloading is allowed for
- -- any entity that is found using rtsfind. A fatal error is given if this
- -- rule is violated. The one exception is for Save_Occurrence, where the
- -- RM mandates the overloading. In this case, the compiler only uses the
- -- procedure, not the function, and the procedure must come first so that
- -- the compiler finds it and not the function.
+ -- It is normally not allowed to have more than one of these entities with
+ -- the same name in a given package. The one exception is Save_Occurrence,
+ -- where the RM mandates the overloading. In this case, the compiler uses
+ -- the procedure, not the function, and the procedure must come first so
+ -- that the compiler finds it and not the function.
type RE_Id is (