diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-19 11:02:48 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-19 11:02:48 +0000 |
commit | 757d44b946bf023f0ef0dbf9eb49a743c8d482e3 (patch) | |
tree | c5da7428ceb37eac13e1c97e08e78fc4ac813549 /gcc/ada/exp_ch6.adb | |
parent | 2ba655a7cdb7a68acb4377e360a6e8fb88caee50 (diff) | |
download | ppe42-gcc-757d44b946bf023f0ef0dbf9eb49a743c8d482e3.tar.gz ppe42-gcc-757d44b946bf023f0ef0dbf9eb49a743c8d482e3.zip |
2014-02-19 Robert Dewar <dewar@adacore.com>
* exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
(Expand_Min_Max_Attribute): Use Matching_Standard_Type.
* exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
handling for the case of Modify_Tree_For_C, this approach did
not work.
* exp_util.adb (Matching_Standard_Type): New function
(Side_Effect_Free): New top level functions (from
Remove_Side_Effects).
* exp_util.ads (Side_Effect_Free): New top level functions
(moved from body).
* sinfo.ads: Minor comment updates.
2014-02-19 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Simple_Function_Return): If return
type is unconstrained and uses the secondary stack, mark the
enclosing function accordingly, to ensure that the value is not
prematurely removed.
2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
* par.adb Alphabetize the routines in Par.Sync.
(Resync_Past_Malformed_Aspect): New routine.
* par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
variables. Code and comment reformatting. Detect missing
parentheses on aspects [Refined_]Global and [Refined_]Depends
with a non-null definition.
* par-sync.adb: Alphabetize all routines in this separate unit.
(Resync_Past_Malformed_Aspect): New routine.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207890 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 39085843ae5..e1c4722c5c3 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -7834,6 +7834,13 @@ package body Exp_Ch6 is Set_Sec_Stack_Needed_For_Return (S, True); S := Enclosing_Dynamic_Scope (S); end loop; + + -- The enclosing function itself must be marked as well, to + -- prevent premature secondary stack cleanup. + + if Ekind (S) = E_Function then + Set_Sec_Stack_Needed_For_Return (Scope_Id); + end if; end; -- Optimize the case where the result is a function call. In this |