From: Thomas Quinot Date: Mon, 26 May 2008 13:43:43 +0000 (+0200) Subject: exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add missing guard on condition for assignment... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4babc15de396a477996d32652c18f759b8cc6572;p=gcc.git exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add missing guard on condition for assignment to temporary. 2008-05-26 Thomas Quinot * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add missing guard on condition for assignment to temporary. From-SVN: r135924 --- diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 00ab0d6fa9d..8d8a281c7da 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -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 (