diff options
author | Javier Miranda <miranda@adacore.com> | 2009-08-07 09:58:18 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-08-07 11:58:18 +0200 |
commit | 1c939d817555244adf45254697fda25717746c95 (patch) | |
tree | ec88f9555c446197de96303f7f0df642de706e02 | |
parent | 005ae22564588da01bcc20e7ff28f840658146d1 (diff) | |
download | gcc-1c939d817555244adf45254697fda25717746c95.zip gcc-1c939d817555244adf45254697fda25717746c95.tar.gz gcc-1c939d817555244adf45254697fda25717746c95.tar.bz2 |
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
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_ch7.adb | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0a1e0e2..87b5356 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 3e8fc6a..a4f6a66 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -3554,8 +3554,18 @@ package body Exp_Ch7 is 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, @@ -3565,7 +3575,7 @@ package body Exp_Ch7 is 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); |