Commit 1c939d81 by Javier Miranda Committed by Arnaud Charlet

exp_ch7.adb (Wrap_Transient_Expression): Add missing adjustment of SCIL node.

2009-08-07  Javier Miranda  <miranda@adacore.com>

	* exp_ch7.adb (Wrap_Transient_Expression): Add missing adjustment of
	SCIL node.

From-SVN: r150565
parent 005ae225
2009-08-07 Javier Miranda <miranda@adacore.com>
* exp_ch7.adb (Wrap_Transient_Expression): Add missing adjustment of
SCIL node.
2009-08-07 Robert Dewar <dewar@adacore.com> 2009-08-07 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Warn_On_Unreferenced_Entity): Fix obvious typo. * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix obvious typo.
......
...@@ -3554,8 +3554,18 @@ package body Exp_Ch7 is ...@@ -3554,8 +3554,18 @@ package body Exp_Ch7 is
Loc : constant Source_Ptr := Sloc (N); Loc : constant Source_Ptr := Sloc (N);
E : constant Entity_Id := Make_Temporary (Loc, 'E', N); E : constant Entity_Id := Make_Temporary (Loc, 'E', N);
Etyp : constant Entity_Id := Etype (N); Etyp : constant Entity_Id := Etype (N);
Expr : constant Node_Id := Relocate_Node (N);
begin begin
-- If the relocated node is a function call then check if some SCIL
-- node references it and needs readjustment.
if Generate_SCIL
and then Nkind (N) = N_Function_Call
then
Adjust_SCIL_Node (N, Expr);
end if;
Insert_Actions (N, New_List ( Insert_Actions (N, New_List (
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => E, Defining_Identifier => E,
...@@ -3565,7 +3575,7 @@ package body Exp_Ch7 is ...@@ -3565,7 +3575,7 @@ package body Exp_Ch7 is
Action => Action =>
Make_Assignment_Statement (Loc, Make_Assignment_Statement (Loc,
Name => New_Reference_To (E, Loc), Name => New_Reference_To (E, Loc),
Expression => Relocate_Node (N))))); Expression => Expr))));
Rewrite (N, New_Reference_To (E, Loc)); Rewrite (N, New_Reference_To (E, Loc));
Analyze_And_Resolve (N, Etyp); Analyze_And_Resolve (N, Etyp);
......
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