diff options
author | Thomas Quinot <quinot@adacore.com> | 2008-05-26 15:43:43 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-26 15:43:43 +0200 |
commit | 4babc15de396a477996d32652c18f759b8cc6572 (patch) | |
tree | 150a0885d2a3a2a74ee4c7f22095075a6b1253a2 | |
parent | ce2b6ba521252796f61a25ada77f3e55ea97b36d (diff) | |
download | gcc-4babc15de396a477996d32652c18f759b8cc6572.zip gcc-4babc15de396a477996d32652c18f759b8cc6572.tar.gz gcc-4babc15de396a477996d32652c18f759b8cc6572.tar.bz2 |
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
-rw-r--r-- | gcc/ada/exp_ch5.adb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 00ab0d6..8d8a281 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 ( |