+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>
* sem_warn.adb (Warn_On_Unreferenced_Entity): Fix obvious typo.
Loc : constant Source_Ptr := Sloc (N);
E : constant Entity_Id := Make_Temporary (Loc, 'E', N);
Etyp : constant Entity_Id := Etype (N);
+ Expr : constant Node_Id := Relocate_Node (N);
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 (
Make_Object_Declaration (Loc,
Defining_Identifier => E,
Action =>
Make_Assignment_Statement (Loc,
Name => New_Reference_To (E, Loc),
- Expression => Relocate_Node (N)))));
+ Expression => Expr))));
Rewrite (N, New_Reference_To (E, Loc));
Analyze_And_Resolve (N, Etyp);