diff options
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r-- | gcc/ada/exp_ch4.adb | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index b427002..76386fc 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -432,7 +432,7 @@ package body Exp_Ch4 is exception when RE_Not_Available => - return; + null; end Build_Boolean_Array_Proc_Call; --------------------------------- @@ -1236,7 +1236,7 @@ package body Exp_Ch4 is exception when RE_Not_Available => - return; + null; end Expand_Allocator_Expression; ----------------------------- @@ -5067,7 +5067,7 @@ package body Exp_Ch4 is exception when RE_Not_Available => - return; + null; end Expand_N_Allocator; ----------------------- @@ -7758,7 +7758,7 @@ package body Exp_Ch4 is exception when RE_Not_Available => - return; + null; end Expand_N_Null; --------------------- @@ -9143,7 +9143,7 @@ package body Exp_Ch4 is exception when RE_Not_Available => - return; + null; end Expand_N_Op_Expon; -------------------- @@ -11285,11 +11285,12 @@ package body Exp_Ch4 is ----------------------------------- procedure Handle_Changed_Representation is - Temp : Entity_Id; + Cons : List_Id; Decl : Node_Id; - Odef : Node_Id; N_Ix : Node_Id; - Cons : List_Id; + Odef : Node_Id; + Stmt : Node_Id; + Temp : Entity_Id; begin -- Nothing else to do if no change of representation @@ -11432,19 +11433,24 @@ package body Exp_Ch4 is Defining_Identifier => Temp, Object_Definition => Odef); - Set_No_Initialization (Decl, True); + -- The temporary need not be initialized + + Set_No_Initialization (Decl); + + Stmt := + Make_Assignment_Statement (Loc, + Name => New_Occurrence_Of (Temp, Loc), + Expression => Relocate_Node (N)); + + -- And, therefore, cannot be finalized + + Set_No_Finalize_Actions (Stmt); -- Insert required actions. It is essential to suppress checks -- since we have suppressed default initialization, which means -- that the variable we create may have no discriminants. - Insert_Actions (N, - New_List ( - Decl, - Make_Assignment_Statement (Loc, - Name => New_Occurrence_Of (Temp, Loc), - Expression => Relocate_Node (N))), - Suppress => All_Checks); + Insert_Actions (N, New_List (Decl, Stmt), Suppress => All_Checks); Rewrite (N, New_Occurrence_Of (Temp, Loc)); return; @@ -13567,7 +13573,7 @@ package body Exp_Ch4 is exception when RE_Not_Available => - return; + null; end Insert_Dereference_Action; -------------------------------- |