diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8207826eabee..43d837b3095d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-07-31 Hristian Kirtchev + + * sem_res.adb (Resolve_Call): Establish a transient scope to + manage the secondary stack when the designated type of an + access-to-subprogram requires it. + 2018-07-31 Ed Schonberg * exp_ch7.adb (Check_Unnesting_Elaboration_Code): To find local diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 5f9f1c3911db..ddfa5430a7b7 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -6433,7 +6433,7 @@ package body Sem_Res is null; elsif Expander_Active - and then Ekind (Nam) = E_Function + and then Ekind_In (Nam, E_Function, E_Subprogram_Type) and then Requires_Transient_Scope (Etype (Nam)) then Establish_Transient_Scope (N, Manage_Sec_Stack => True);