https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66242
--- Comment #4 from Arnaud Charlet <charlet at gcc dot gnu.org> --- Author: charlet Date: Wed Nov 18 10:30:12 2015 New Revision: 230531 URL: https://gcc.gnu.org/viewcvs?rev=230531&root=gcc&view=rev Log: 2015-11-18 Hristian Kirtchev <kirtc...@adacore.com> PR ada/66242 * exp_ch3.adb (Default_Initialize_Object): Reimplemented. Abort defer / undefer pairs are now encapsulated in a block with an AT END handler. Partial finalization now takes restriction No_Exception_Propagation into account when generating blocks. * exp_ch7.adb Various reformattings. (Create_Finalizer): Change the generation of abort defer / undefer pairs and explain the lack of an AT END handler. (Process_Transient_Objects): Add generation of abort defer/undefer pairs. * exp_ch9.adb Various reformattings. (Build_Protected_Subprogram_Body): Use Build_Runtime_Call to construct a call to Abort_Defer. (Build_Protected_Subprogram_Call_Cleanup): Use Build_Runtime_Call to construct a call to Abort_Undefer. (Expand_N_Asynchronous_Select): Use Build_Runtime_Call to construct a call to Abort_Defer. * exp_intr.adb (Expand_Unc_Deallocation): Abort defer / undefer pairs are now encapsulated in a block with an AT END handler. Finalization now takes restriction No_Exception_Propagation into account when generating blocks. * exp_util.ads, exp_util.adb (Wrap_Cleanup_Procedure): Removed. Modified: trunk/gcc/ada/exp_ch3.adb trunk/gcc/ada/exp_ch7.adb trunk/gcc/ada/exp_ch9.adb trunk/gcc/ada/exp_intr.adb trunk/gcc/ada/exp_util.adb trunk/gcc/ada/exp_util.ads