diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-01 16:37:00 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-01 16:37:00 +0200 |
commit | a43f6434dbf7bd6aa5f1a123c917b2f5f91e75ae (patch) | |
tree | dfe0e0bf035c4c94c1fdec3041497cf35897adc4 /gcc/ada/exp_intr.adb | |
parent | bdc193bad16766de82346ac6191a49e0771662c6 (diff) | |
download | gcc-a43f6434dbf7bd6aa5f1a123c917b2f5f91e75ae.zip gcc-a43f6434dbf7bd6aa5f1a123c917b2f5f91e75ae.tar.gz gcc-a43f6434dbf7bd6aa5f1a123c917b2f5f91e75ae.tar.bz2 |
[multiple changes]
2014-08-01 Robert Dewar <dewar@adacore.com>
* sem_ch8.adb, opt.ads Minor comment updates.
2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
* exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
from the side effects removal machinery.
* exp_util.adb (Duplicate_Subexpr): Add formal parameter
Renaming_Req. Update the nested call to Remove_Side_Effects.
(Duplicate_Subexpr_No_Checks): Add formal parameter
Renaming_Req. Update the nested call to Remove_Side_Effects.
(Duplicate_Subexpr_Move_Checks): Add formal parameter
Renaming_Req. Update the nested call to Remove_Side_Effects.
(Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
an object renaming declaration when the caller requests it.
* exp_util.ads (Duplicate_Subexpr): Add formal
parameter Renaming_Req. Update comment on usage.
(Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
(Duplicate_Subexpr_Move_Checks): Add formal parameter
Renaming_Req.
From-SVN: r213480
Diffstat (limited to 'gcc/ada/exp_intr.adb')
-rw-r--r-- | gcc/ada/exp_intr.adb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/exp_intr.adb b/gcc/ada/exp_intr.adb index a2d02e8..465c8b2 100644 --- a/gcc/ada/exp_intr.adb +++ b/gcc/ada/exp_intr.adb @@ -1106,9 +1106,11 @@ package body Exp_Intr is end if; end if; - -- Normal processing for non-controlled types + -- Normal processing for non-controlled types. The argument to free is + -- a renaming rather than a constant to ensure that the original context + -- is always set to null after the deallocation takes place. - Free_Arg := Duplicate_Subexpr_No_Checks (Arg); + Free_Arg := Duplicate_Subexpr_No_Checks (Arg, Renaming_Req => True); Free_Node := Make_Free_Statement (Loc, Empty); Append_To (Stmts, Free_Node); Set_Storage_Pool (Free_Node, Pool); |