diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-29 14:50:18 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-29 14:50:18 +0200 |
commit | e2bc5465d67a558c23830e1561077eaba1f68973 (patch) | |
tree | 4a5a4a18d332f90e79570e013594d8a2f996c0ca /gcc/ada/exp_intr.adb | |
parent | 414c65636fdd1503b2134da24a49bb8a3ab57ee3 (diff) | |
download | gcc-e2bc5465d67a558c23830e1561077eaba1f68973.zip gcc-e2bc5465d67a558c23830e1561077eaba1f68973.tar.gz gcc-e2bc5465d67a558c23830e1561077eaba1f68973.tar.bz2 |
[multiple changes]
2014-07-29 Robert Dewar <dewar@adacore.com>
* errout.adb: Minor reformatting.
2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Default_Initialize_Object): Add new variables
Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
not allowed to ensure the symmetrical generation of symbols.
* exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
and E_Decl. Add new variables Decl and Dummy. Generate a dummy
temporary when aborts are not allowed to ensure symmertrical
generation of symbols.
* exp_intr.adb (Expand_Unc_Deallocation): Add new variable
Dummy. Generate a dummy temporary when aborts are not allowed
to ensure symmertrical generation of symbols.
2014-07-29 Ed Schonberg <schonberg@adacore.com>
* exp_dbug.adb (Debug_Renaming_Declaration): For an object
renaming, indicate that the renamed entity itself needs debug
information. This is necessary if that entity is a temporary,
e.g. part of the expansion of an explicit dereference in an
iterator.
From-SVN: r213157
Diffstat (limited to 'gcc/ada/exp_intr.adb')
-rw-r--r-- | gcc/ada/exp_intr.adb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ada/exp_intr.adb b/gcc/ada/exp_intr.adb index a4a4989..3c6eb74 100644 --- a/gcc/ada/exp_intr.adb +++ b/gcc/ada/exp_intr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -914,6 +914,7 @@ package body Exp_Intr is Finalizer_Data : Finalization_Exception_Data; Blk : Node_Id := Empty; + Blk_Id : Entity_Id; Deref : Node_Id; Final_Code : List_Id; Free_Arg : Node_Id; @@ -926,6 +927,11 @@ package body Exp_Intr is -- that we analyze some generated statements before properly attaching -- them to the tree, and that can disturb current value settings. + Dummy : Entity_Id; + pragma Unreferenced (Dummy); + -- This variable captures an unused dummy internal entity, see the + -- comment associated with its use. + begin -- Nothing to do if we know the argument is null @@ -1007,8 +1013,7 @@ package body Exp_Intr is -- protected by an abort defer/undefer pair. if Abort_Allowed then - Prepend_To (Final_Code, - Build_Runtime_Call (Loc, RE_Abort_Defer)); + Prepend_To (Final_Code, Build_Runtime_Call (Loc, RE_Abort_Defer)); Blk := Make_Block_Statement (Loc, Handled_Statement_Sequence => @@ -1016,9 +1021,15 @@ package body Exp_Intr is Statements => Final_Code, At_End_Proc => New_Occurrence_Of (RTE (RE_Abort_Undefer_Direct), Loc))); + Add_Block_Identifier (Blk, Blk_Id); Append (Blk, Stmts); + else + -- Generate a dummy entity to ensure that the internal symbols are + -- in sync when a unit is compiled with and without aborts. + + Dummy := New_Internal_Entity (E_Block, Current_Scope, Loc, 'B'); Append_List_To (Stmts, Final_Code); end if; end if; |