diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-16 13:41:29 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-16 13:41:29 +0000 |
commit | 829967f1aa91bbb942b6aff327e04627e7099070 (patch) | |
tree | f9e873bd79131ffc12f463a8de5aa67ea40b6b21 /gcc/ada/sem_ch5.adb | |
parent | 8421bfe4f9b66fe68d0c885307023ee6ce389759 (diff) | |
download | gcc-829967f1aa91bbb942b6aff327e04627e7099070.tar.gz |
2015-10-16 Javier Miranda <miranda@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Associate a
transient scope with the renaming object declararation.
* exp_util.adb (Insert_Actions): if the enclosing interator
loop is marked as requiring the secondary stack then attach the
actions to the transient scope.
2015-10-16 Bob Duff <duff@adacore.com>
* exp_ch7.adb: Minor spelling fixes.
2015-10-16 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Replace_Anonymous_Access_To_Protected_Subprogram):
If anonymous type is component type of array type declaration,
analyze its declaration in the current scope, not the enclosing
one.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228906 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r-- | gcc/ada/sem_ch5.adb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index d2d5f25f3f3..234317c0f1d 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -30,6 +30,7 @@ with Einfo; use Einfo; with Errout; use Errout; with Expander; use Expander; with Exp_Ch6; use Exp_Ch6; +with Exp_Ch7; use Exp_Ch7; with Exp_Util; use Exp_Util; with Freeze; use Freeze; with Ghost; use Ghost; @@ -1959,6 +1960,16 @@ package body Sem_Ch5 is Name => New_Copy_Tree (Iter_Name, New_Sloc => Loc)); + -- Create a transient scope to ensure that all the temporaries + -- generated by Remove_Side_Effects as part of processing this + -- renaming declaration (if any) are attached by Insert_Actions + -- to it. It has no effect on the generated code if no actions + -- are added to it (see Wrap_Transient_Declaration). + + if Expander_Active then + Establish_Transient_Scope (Name (Decl), Sec_Stack => True); + end if; + Insert_Actions (Parent (Parent (N)), New_List (Decl)); Rewrite (Name (N), New_Occurrence_Of (Id, Loc)); Set_Etype (Id, Typ); |