exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add missing guard on condition for assignment to temporary.

2008-05-26  Thomas Quinot  <quinot@adacore.com>

	* exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add missing guard on
	condition for assignment to temporary.

From-SVN: r135924
This commit is contained in:
Thomas Quinot 2008-05-26 15:43:43 +02:00 committed by Arnaud Charlet
parent ce2b6ba521
commit 4babc15de3

View File

@ -734,8 +734,8 @@ package body Exp_Ch5 is
and then not No_Ctrl_Actions (N)
then
declare
Proc : constant Entity_Id :=
TSS (Base_Type (L_Type), TSS_Slice_Assign);
Proc : constant Entity_Id :=
TSS (Base_Type (L_Type), TSS_Slice_Assign);
Actuals : List_Id;
begin
@ -872,7 +872,7 @@ package body Exp_Ch5 is
-- explicit bounds of right and left hand sides.
declare
Proc : constant Node_Id :=
Proc : constant Entity_Id :=
TSS (Base_Type (L_Type), TSS_Slice_Assign);
Actuals : List_Id;
@ -4186,13 +4186,16 @@ package body Exp_Ch5 is
if not Ctrl_Act then
null;
-- The left hand side is an uninitialized temporary
-- The left hand side is an uninitialized temporary object
elsif Nkind (L) = N_Type_Conversion
and then Is_Entity_Name (Expression (L))
and then Nkind (Parent (Entity (Expression (L))))
= N_Object_Declaration
and then No_Initialization (Parent (Entity (Expression (L))))
then
null;
else
Append_List_To (Res,
Make_Final_Call (