Commit bac5ba15 by Arnaud Charlet

[multiple changes]

2016-05-02  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
	reformatting.

2016-05-02  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Expand_N_Allocator): If the designated type
	is a private derived type with no discriminants, examine its
	underlying_full_view to determine whether the full view has
	defaulted discriminants, so their defaults can be used in the
	call to the initialization procedure for the designated object.

From-SVN: r235740
parent 42f11e4c
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com> 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
reformatting.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Allocator): If the designated type
is a private derived type with no discriminants, examine its
underlying_full_view to determine whether the full view has
defaulted discriminants, so their defaults can be used in the
call to the initialization procedure for the designated object.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* exp_prag.adb, comperr.adb: Minor reformatting. * exp_prag.adb, comperr.adb: Minor reformatting.
2016-05-02 Ed Schonberg <schonberg@adacore.com> 2016-05-02 Ed Schonberg <schonberg@adacore.com>
......
...@@ -5908,7 +5908,7 @@ package body Einfo is ...@@ -5908,7 +5908,7 @@ package body Einfo is
procedure Set_Original_Protected_Subprogram (Id : E; V : N) is procedure Set_Original_Protected_Subprogram (Id : E; V : N) is
begin begin
pragma Assert (Ekind_In (Id, E_Procedure, E_Function)); pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
Set_Node41 (Id, V); Set_Node41 (Id, V);
end Set_Original_Protected_Subprogram; end Set_Original_Protected_Subprogram;
......
...@@ -4503,12 +4503,25 @@ package body Exp_Ch4 is ...@@ -4503,12 +4503,25 @@ package body Exp_Ch4 is
Dis := True; Dis := True;
Typ := T; Typ := T;
elsif Is_Private_Type (T) -- Type may be a private type with no visible discriminants
and then Present (Full_View (T)) -- in which case check full view if in scope, or the
and then Has_Discriminants (Full_View (T)) -- underlying_full_view if dealing with a type whose full
then -- view may be derived from a private type whose own full
Dis := True; -- view has discriminants.
Typ := Full_View (T);
elsif Is_Private_Type (T) then
if Present (Full_View (T))
and then Has_Discriminants (Full_View (T))
then
Dis := True;
Typ := Full_View (T);
elsif Present (Underlying_Full_View (T))
and then Has_Discriminants (Underlying_Full_View (T))
then
Dis := True;
Typ := Underlying_Full_View (T);
end if;
end if; end if;
if Dis then if Dis then
......
...@@ -2558,9 +2558,9 @@ package body Exp_Ch9 is ...@@ -2558,9 +2558,9 @@ package body Exp_Ch9 is
end if; end if;
return return
Type_Conformant_Parameters ( Type_Conformant_Parameters
Parameter_Specifications (Iface_Op_Spec), (Parameter_Specifications (Iface_Op_Spec),
Parameter_Specifications (Wrapper_Spec)); Parameter_Specifications (Wrapper_Spec));
end Overriding_Possible; end Overriding_Possible;
----------------------- -----------------------
...@@ -2609,14 +2609,13 @@ package body Exp_Ch9 is ...@@ -2609,14 +2609,13 @@ package body Exp_Ch9 is
Append_To (New_Formals, Append_To (New_Formals,
Make_Parameter_Specification (Loc, Make_Parameter_Specification (Loc,
Defining_Identifier => Defining_Identifier =>
Make_Defining_Identifier (Loc, Make_Defining_Identifier (Loc,
Chars => Chars Chars => Chars (Defining_Identifier (Formal))),
(Defining_Identifier (Formal))), In_Present => In_Present (Formal),
In_Present => In_Present (Formal), Out_Present => Out_Present (Formal),
Out_Present => Out_Present (Formal), Null_Exclusion_Present => Null_Exclusion_Present (Formal),
Null_Exclusion_Present => Null_Exclusion_Present (Formal), Parameter_Type => Param_Type));
Parameter_Type => Param_Type));
Next (Formal); Next (Formal);
end loop; end loop;
...@@ -2776,13 +2775,16 @@ package body Exp_Ch9 is ...@@ -2776,13 +2775,16 @@ package body Exp_Ch9 is
else else
pragma Assert (Is_Private_Primitive_Subprogram (Subp_Id)); pragma Assert (Is_Private_Primitive_Subprogram (Subp_Id));
Obj_Param := Obj_Param :=
Make_Parameter_Specification (Loc, Make_Parameter_Specification (Loc,
Defining_Identifier => Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uO), Make_Defining_Identifier (Loc, Name_uO),
In_Present => In_Present (Parent (First_Entity (Subp_Id))), In_Present =>
Out_Present => Ekind (Subp_Id) /= E_Function, In_Present (Parent (First_Entity (Subp_Id))),
Parameter_Type => New_Occurrence_Of (Obj_Typ, Loc)); Out_Present => Ekind (Subp_Id) /= E_Function,
Parameter_Type => New_Occurrence_Of (Obj_Typ, Loc));
Prepend_To (New_Formals, Obj_Param); Prepend_To (New_Formals, Obj_Param);
end if; end if;
...@@ -4195,8 +4197,7 @@ package body Exp_Ch9 is ...@@ -4195,8 +4197,7 @@ package body Exp_Ch9 is
Unprotected_Mode => 'N'); Unprotected_Mode => 'N');
begin begin
if Ekind (Defining_Unit_Name (Specification (N))) = if Ekind (Defining_Unit_Name (Specification (N))) = E_Subprogram_Body
E_Subprogram_Body
then then
Decl := Unit_Declaration_Node (Corresponding_Spec (N)); Decl := Unit_Declaration_Node (Corresponding_Spec (N));
else else
...@@ -4238,7 +4239,7 @@ package body Exp_Ch9 is ...@@ -4238,7 +4239,7 @@ package body Exp_Ch9 is
if Nkind (Specification (Decl)) = N_Procedure_Specification then if Nkind (Specification (Decl)) = N_Procedure_Specification then
New_Spec := New_Spec :=
Make_Procedure_Specification (Loc, Make_Procedure_Specification (Loc,
Defining_Unit_Name => New_Id, Defining_Unit_Name => New_Id,
Parameter_Specifications => New_Plist); Parameter_Specifications => New_Plist);
-- Create a new specification for the anonymous subprogram type -- Create a new specification for the anonymous subprogram type
...@@ -4246,9 +4247,9 @@ package body Exp_Ch9 is ...@@ -4246,9 +4247,9 @@ package body Exp_Ch9 is
else else
New_Spec := New_Spec :=
Make_Function_Specification (Loc, Make_Function_Specification (Loc,
Defining_Unit_Name => New_Id, Defining_Unit_Name => New_Id,
Parameter_Specifications => New_Plist, Parameter_Specifications => New_Plist,
Result_Definition => Result_Definition =>
Copy_Result_Type (Result_Definition (Specification (Decl)))); Copy_Result_Type (Result_Definition (Specification (Decl))));
Set_Return_Present (Defining_Unit_Name (New_Spec)); Set_Return_Present (Defining_Unit_Name (New_Spec));
...@@ -9654,22 +9655,22 @@ package body Exp_Ch9 is ...@@ -9654,22 +9655,22 @@ package body Exp_Ch9 is
Present (Interfaces (Corresponding_Record_Type (Prot_Typ))) Present (Interfaces (Corresponding_Record_Type (Prot_Typ)))
then then
declare declare
Found : Boolean := False;
Prim_Elmt : Elmt_Id; Prim_Elmt : Elmt_Id;
Prim_Op : Node_Id; Prim_Op : Node_Id;
Found : Boolean := False;
begin begin
Prim_Elmt := Prim_Elmt :=
First_Elmt First_Elmt
(Primitive_Operations (Primitive_Operations
(Corresponding_Record_Type (Prot_Typ))); (Corresponding_Record_Type (Prot_Typ)));
while Present (Prim_Elmt) loop while Present (Prim_Elmt) loop
Prim_Op := Node (Prim_Elmt); Prim_Op := Node (Prim_Elmt);
if Is_Primitive_Wrapper (Prim_Op) if Is_Primitive_Wrapper (Prim_Op)
and then (Wrapped_Entity (Prim_Op)) and then Wrapped_Entity (Prim_Op) =
= Defining_Entity (Specification (Comp)) Defining_Entity (Specification (Comp))
then then
Found := True; Found := True;
exit; exit;
...@@ -9684,6 +9685,7 @@ package body Exp_Ch9 is ...@@ -9684,6 +9685,7 @@ package body Exp_Ch9 is
Specification => Specification =>
Build_Protected_Sub_Specification Build_Protected_Sub_Specification
(Comp, Prot_Typ, Dispatching_Mode)); (Comp, Prot_Typ, Dispatching_Mode));
Insert_After (Current_Node, Sub); Insert_After (Current_Node, Sub);
Analyze (Sub); Analyze (Sub);
...@@ -9740,19 +9742,19 @@ package body Exp_Ch9 is ...@@ -9740,19 +9742,19 @@ package body Exp_Ch9 is
Body_Arr := Body_Arr :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Body_Id, Defining_Identifier => Body_Id,
Aliased_Present => True, Aliased_Present => True,
Object_Definition => Object_Definition =>
Make_Subtype_Indication (Loc, Make_Subtype_Indication (Loc,
Subtype_Mark => Subtype_Mark =>
New_Occurrence_Of New_Occurrence_Of
(RTE (RE_Protected_Entry_Body_Array), Loc), (RTE (RE_Protected_Entry_Body_Array), Loc),
Constraint => Constraint =>
Make_Index_Or_Discriminant_Constraint (Loc, Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List ( Constraints => New_List (
Make_Range (Loc, Make_Range (Loc,
Make_Integer_Literal (Loc, 1), Make_Integer_Literal (Loc, 1),
Make_Integer_Literal (Loc, E_Count))))), Make_Integer_Literal (Loc, E_Count))))),
Expression => Entries_Aggr); Expression => Entries_Aggr);
when System_Tasking_Protected_Objects_Single_Entry => when System_Tasking_Protected_Objects_Single_Entry =>
Body_Arr := Body_Arr :=
...@@ -9761,7 +9763,8 @@ package body Exp_Ch9 is ...@@ -9761,7 +9763,8 @@ package body Exp_Ch9 is
Aliased_Present => True, Aliased_Present => True,
Object_Definition => Object_Definition =>
New_Occurrence_Of (RTE (RE_Entry_Body), Loc), New_Occurrence_Of (RTE (RE_Entry_Body), Loc),
Expression => Remove_Head (Expressions (Entries_Aggr))); Expression =>
Remove_Head (Expressions (Entries_Aggr)));
when others => when others =>
raise Program_Error; raise Program_Error;
......
...@@ -19828,8 +19828,8 @@ package body Sem_Ch3 is ...@@ -19828,8 +19828,8 @@ package body Sem_Ch3 is
(Subp_Id => Prim, (Subp_Id => Prim,
Obj_Typ => Conc_Typ, Obj_Typ => Conc_Typ,
Formals => Formals =>
Parameter_Specifications ( Parameter_Specifications
Parent (Prim)))); (Parent (Prim))));
Insert_After (Curr_Nod, Wrap_Spec); Insert_After (Curr_Nod, Wrap_Spec);
Curr_Nod := Wrap_Spec; Curr_Nod := Wrap_Spec;
......
...@@ -9022,9 +9022,10 @@ package body Sem_Ch4 is ...@@ -9022,9 +9022,10 @@ package body Sem_Ch4 is
-- Exp_Ch9.Build_Selected_Name). -- Exp_Ch9.Build_Selected_Name).
elsif Is_Protected_Type (Obj_Type) then elsif Is_Protected_Type (Obj_Type) then
return Present (Original_Protected_Subprogram (Prim_Op)) return
and then Chars (Original_Protected_Subprogram (Prim_Op)) Present (Original_Protected_Subprogram (Prim_Op))
= Chars (Subprog); and then Chars (Original_Protected_Subprogram (Prim_Op)) =
Chars (Subprog);
end if; end if;
return False; return False;
......
...@@ -6491,13 +6491,6 @@ package body Sem_Ch6 is ...@@ -6491,13 +6491,6 @@ package body Sem_Ch6 is
(Prim_Params : List_Id; (Prim_Params : List_Id;
Iface_Params : List_Id) return Boolean Iface_Params : List_Id) return Boolean
is is
Iface_Id : Entity_Id;
Iface_Param : Node_Id;
Iface_Typ : Entity_Id;
Prim_Id : Entity_Id;
Prim_Param : Node_Id;
Prim_Typ : Entity_Id;
function Is_Implemented function Is_Implemented
(Ifaces_List : Elist_Id; (Ifaces_List : Elist_Id;
Iface : Entity_Id) return Boolean; Iface : Entity_Id) return Boolean;
...@@ -6527,6 +6520,15 @@ package body Sem_Ch6 is ...@@ -6527,6 +6520,15 @@ package body Sem_Ch6 is
return False; return False;
end Is_Implemented; end Is_Implemented;
-- Local variables
Iface_Id : Entity_Id;
Iface_Param : Node_Id;
Iface_Typ : Entity_Id;
Prim_Id : Entity_Id;
Prim_Param : Node_Id;
Prim_Typ : Entity_Id;
-- Start of processing for Matches_Prefixed_View_Profile -- Start of processing for Matches_Prefixed_View_Profile
begin begin
...@@ -6539,8 +6541,8 @@ package body Sem_Ch6 is ...@@ -6539,8 +6541,8 @@ package body Sem_Ch6 is
Prim_Param := First (Prim_Params); Prim_Param := First (Prim_Params);
-- The first parameter of the potentially overridden subprogram -- The first parameter of the potentially overridden subprogram must
-- must be an interface implemented by Prim. -- be an interface implemented by Prim.
if not Is_Interface (Iface_Typ) if not Is_Interface (Iface_Typ)
or else not Is_Implemented (Ifaces_List, Iface_Typ) or else not Is_Implemented (Ifaces_List, Iface_Typ)
...@@ -6548,8 +6550,8 @@ package body Sem_Ch6 is ...@@ -6548,8 +6550,8 @@ package body Sem_Ch6 is
return False; return False;
end if; end if;
-- The checks on the object parameters are done, move onto the -- The checks on the object parameters are done, move onto the rest
-- rest of the parameters. -- of the parameters.
if not In_Scope then if not In_Scope then
Prim_Param := Next (Prim_Param); Prim_Param := Next (Prim_Param);
...@@ -6568,15 +6570,15 @@ package body Sem_Ch6 is ...@@ -6568,15 +6570,15 @@ package body Sem_Ch6 is
and then Is_Concurrent_Type (Designated_Type (Prim_Typ)) and then Is_Concurrent_Type (Designated_Type (Prim_Typ))
then then
Iface_Typ := Designated_Type (Iface_Typ); Iface_Typ := Designated_Type (Iface_Typ);
Prim_Typ := Designated_Type (Prim_Typ); Prim_Typ := Designated_Type (Prim_Typ);
end if; end if;
-- Case of multiple interface types inside a parameter profile -- Case of multiple interface types inside a parameter profile
-- (Obj_Param : in out Iface; ...; Param : Iface) -- (Obj_Param : in out Iface; ...; Param : Iface)
-- If the interface type is implemented, then the matching type -- If the interface type is implemented, then the matching type in
-- in the primitive should be the implementing record type. -- the primitive should be the implementing record type.
if Ekind (Iface_Typ) = E_Record_Type if Ekind (Iface_Typ) = E_Record_Type
and then Is_Interface (Iface_Typ) and then Is_Interface (Iface_Typ)
...@@ -6626,9 +6628,9 @@ package body Sem_Ch6 is ...@@ -6626,9 +6628,9 @@ package body Sem_Ch6 is
return; return;
end if; end if;
-- Search for the concurrent declaration since it contains the list -- Search for the concurrent declaration since it contains the list of
-- of all implemented interfaces. In this case, the subprogram is -- all implemented interfaces. In this case, the subprogram is declared
-- declared within the scope of a protected or a task type. -- within the scope of a protected or a task type.
if Present (Scope (Def_Id)) if Present (Scope (Def_Id))
and then Is_Concurrent_Type (Scope (Def_Id)) and then Is_Concurrent_Type (Scope (Def_Id))
...@@ -6658,10 +6660,10 @@ package body Sem_Ch6 is ...@@ -6658,10 +6660,10 @@ package body Sem_Ch6 is
then then
In_Scope := False; In_Scope := False;
-- This case occurs when the concurrent type is declared within -- This case occurs when the concurrent type is declared within a
-- a generic unit. As a result the corresponding record has been -- generic unit. As a result the corresponding record has been built
-- built and used as the type of the first formal, we just have -- and used as the type of the first formal, we just have to retrieve
-- to retrieve the corresponding concurrent type. -- the corresponding concurrent type.
elsif Is_Concurrent_Record_Type (Typ) elsif Is_Concurrent_Record_Type (Typ)
and then not Is_Class_Wide_Type (Typ) and then not Is_Class_Wide_Type (Typ)
...@@ -6693,9 +6695,8 @@ package body Sem_Ch6 is ...@@ -6693,9 +6695,8 @@ package body Sem_Ch6 is
Subp : Entity_Id := Empty; Subp : Entity_Id := Empty;
begin begin
-- Traverse the homonym chain, looking for a potentially -- Traverse the homonym chain, looking for a potentially overridden
-- overridden subprogram that belongs to an implemented -- subprogram that belongs to an implemented interface.
-- interface.
Hom := Current_Entity_In_Scope (Def_Id); Hom := Current_Entity_In_Scope (Def_Id);
while Present (Hom) loop while Present (Hom) loop
...@@ -6710,11 +6711,10 @@ package body Sem_Ch6 is ...@@ -6710,11 +6711,10 @@ package body Sem_Ch6 is
then then
null; null;
-- Entries and procedures can override abstract or null -- Entries and procedures can override abstract or null interface
-- interface procedures. -- procedures.
elsif (Ekind (Def_Id) = E_Procedure elsif Ekind_In (Def_Id, E_Entry, E_Procedure)
or else Ekind (Def_Id) = E_Entry)
and then Ekind (Subp) = E_Procedure and then Ekind (Subp) = E_Procedure
and then Matches_Prefixed_View_Profile and then Matches_Prefixed_View_Profile
(Parameter_Specifications (Parent (Def_Id)), (Parameter_Specifications (Parent (Def_Id)),
...@@ -6723,17 +6723,16 @@ package body Sem_Ch6 is ...@@ -6723,17 +6723,16 @@ package body Sem_Ch6 is
Candidate := Subp; Candidate := Subp;
-- For an overridden subprogram Subp, check whether the mode -- For an overridden subprogram Subp, check whether the mode
-- of its first parameter is correct depending on the kind -- of its first parameter is correct depending on the kind of
-- of synchronized type. -- synchronized type.
declare declare
Formal : constant Node_Id := First_Formal (Candidate); Formal : constant Node_Id := First_Formal (Candidate);
begin begin
-- In order for an entry or a protected procedure to -- In order for an entry or a protected procedure to
-- override, the first parameter of the overridden -- override, the first parameter of the overridden routine
-- routine must be of mode "out", "in out" or -- must be of mode "out", "in out" or access-to-variable.
-- access-to-variable.
if Ekind_In (Candidate, E_Entry, E_Procedure) if Ekind_In (Candidate, E_Entry, E_Procedure)
and then Is_Protected_Type (Typ) and then Is_Protected_Type (Typ)
...@@ -6744,9 +6743,9 @@ package body Sem_Ch6 is ...@@ -6744,9 +6743,9 @@ package body Sem_Ch6 is
then then
null; null;
-- All other cases are OK since a task entry or routine -- All other cases are OK since a task entry or routine does
-- does not have a restriction on the mode of the first -- not have a restriction on the mode of the first parameter
-- parameter of the overridden interface routine. -- of the overridden interface routine.
else else
Overridden_Subp := Candidate; Overridden_Subp := Candidate;
...@@ -6768,8 +6767,8 @@ package body Sem_Ch6 is ...@@ -6768,8 +6767,8 @@ package body Sem_Ch6 is
-- If an inherited subprogram is implemented by a protected -- If an inherited subprogram is implemented by a protected
-- function, then the first parameter of the inherited -- function, then the first parameter of the inherited
-- subprogram shall be of mode in, but not an -- subprogram shall be of mode in, but not an access-to-
-- access-to-variable parameter (RM 9.4(11/9) -- variable parameter (RM 9.4(11/9)
if Present (First_Formal (Subp)) if Present (First_Formal (Subp))
and then Ekind (First_Formal (Subp)) = E_In_Parameter and then Ekind (First_Formal (Subp)) = E_In_Parameter
...@@ -9692,7 +9691,8 @@ package body Sem_Ch6 is ...@@ -9692,7 +9691,8 @@ package body Sem_Ch6 is
-- Has_Matching_Entry_Or_Subprogram -- -- Has_Matching_Entry_Or_Subprogram --
-------------------------------------- --------------------------------------
function Has_Matching_Entry_Or_Subprogram (E : Entity_Id) return Boolean function Has_Matching_Entry_Or_Subprogram
(E : Entity_Id) return Boolean
is is
function Check_Conforming_Parameters function Check_Conforming_Parameters
(E1_Param : Node_Id; (E1_Param : Node_Id;
...@@ -9738,12 +9738,13 @@ package body Sem_Ch6 is ...@@ -9738,12 +9738,13 @@ package body Sem_Ch6 is
begin begin
while Present (Param_E1) and then Present (Param_E2) loop while Present (Param_E1) and then Present (Param_E2) loop
if Ekind (Defining_Identifier (Param_E1)) if Ekind (Defining_Identifier (Param_E1)) /=
/= Ekind (Defining_Identifier (Param_E2)) Ekind (Defining_Identifier (Param_E2))
or else not or else not
Conforming_Types (Find_Parameter_Type (Param_E1), Conforming_Types
Find_Parameter_Type (Param_E2), (Find_Parameter_Type (Param_E1),
Subtype_Conformant) Find_Parameter_Type (Param_E2),
Subtype_Conformant)
then then
return False; return False;
end if; end if;
...@@ -9799,7 +9800,7 @@ package body Sem_Ch6 is ...@@ -9799,7 +9800,7 @@ package body Sem_Ch6 is
begin begin
-- Search for entities in the enclosing scope of this synchonized -- Search for entities in the enclosing scope of this synchonized
-- type -- type.
pragma Assert (Is_Concurrent_Type (Conc_Typ)); pragma Assert (Is_Concurrent_Type (Conc_Typ));
Push_Scope (Scope (Conc_Typ)); Push_Scope (Scope (Conc_Typ));
...@@ -9841,7 +9842,7 @@ package body Sem_Ch6 is ...@@ -9841,7 +9842,7 @@ package body Sem_Ch6 is
begin begin
-- Temporarily decorate the first parameter of Subp as controlling -- Temporarily decorate the first parameter of Subp as controlling
-- formal; required to invoke Subtype_Conformant() -- formal, required to invoke Subtype_Conformant.
Set_Is_Controlling_Formal (First_Entity (Subp)); Set_Is_Controlling_Formal (First_Entity (Subp));
...@@ -9866,6 +9867,7 @@ package body Sem_Ch6 is ...@@ -9866,6 +9867,7 @@ package body Sem_Ch6 is
end loop; end loop;
Set_Is_Controlling_Formal (First_Entity (Subp), ICF); Set_Is_Controlling_Formal (First_Entity (Subp), ICF);
return Empty; return Empty;
end Matching_Original_Protected_Subprogram; end Matching_Original_Protected_Subprogram;
...@@ -9882,8 +9884,8 @@ package body Sem_Ch6 is ...@@ -9882,8 +9884,8 @@ package body Sem_Ch6 is
and then Is_Concurrent_Record_Type (Etype (First_Entity (E))) and then Is_Concurrent_Record_Type (Etype (First_Entity (E)))
then then
if Scope (E) = if Scope (E) =
Scope (Corresponding_Concurrent_Type ( Scope (Corresponding_Concurrent_Type
Etype (First_Entity (E)))) (Etype (First_Entity (E))))
and then and then
Present Present
(Matching_Entry_Or_Subprogram (Matching_Entry_Or_Subprogram
...@@ -9913,8 +9915,8 @@ package body Sem_Ch6 is ...@@ -9913,8 +9915,8 @@ package body Sem_Ch6 is
and then and then
Present Present
(Matching_Original_Protected_Subprogram (Matching_Original_Protected_Subprogram
(Corresponding_Concurrent_Type (Etype (First_Entity (E))), (Corresponding_Concurrent_Type (Etype (First_Entity (E))),
Subp => E)) Subp => E))
then then
Report_Conflict (E, Report_Conflict (E,
Matching_Original_Protected_Subprogram Matching_Original_Protected_Subprogram
...@@ -9944,8 +9946,8 @@ package body Sem_Ch6 is ...@@ -9944,8 +9946,8 @@ package body Sem_Ch6 is
---------------------------- ----------------------------
function Is_Private_Declaration (E : Entity_Id) return Boolean is function Is_Private_Declaration (E : Entity_Id) return Boolean is
Priv_Decls : List_Id;
Decl : constant Node_Id := Unit_Declaration_Node (E); Decl : constant Node_Id := Unit_Declaration_Node (E);
Priv_Decls : List_Id;
begin begin
if Is_Package_Or_Generic_Package (Current_Scope) if Is_Package_Or_Generic_Package (Current_Scope)
...@@ -9979,6 +9981,7 @@ package body Sem_Ch6 is ...@@ -9979,6 +9981,7 @@ package body Sem_Ch6 is
is is
AO : constant Entity_Id := Alias (Old_E); AO : constant Entity_Id := Alias (Old_E);
AN : constant Entity_Id := Alias (New_E); AN : constant Entity_Id := Alias (New_E);
begin begin
return Scope (AO) /= Scope (AN) return Scope (AO) /= Scope (AN)
or else No (DTC_Entity (AO)) or else No (DTC_Entity (AO))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment