ada: Fix missing finalization of extended return object on abnormal completion
commit2e135bdb28d386b0cda2ee7e35338ad06136042d
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 14 Sep 2023 14:42:45 +0000 (14 16:42 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 26 Sep 2023 11:43:18 +0000 (26 13:43 +0200)
tree3b154e2141b0e904d40a868effd6095403b2fc8a
parent198e643b35df4743e3177fc3a77b50325ae44717
ada: Fix missing finalization of extended return object on abnormal completion

This happens in the case of a nonlimited return type and is a fallout of the
optimization recently implemented for them.

gcc/ada/

* einfo.ads (Status_Flag_Or_Transient_Decl): Remove ??? comment.
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Extend the
handling of finalizable return objects to the non-BIP case.
* exp_ch7.adb (Build_Finalizer.Process_Declarations): Adjust the
comment accordingly.
* exp_util.adb (Requires_Cleanup_Actions): Likewise.
gcc/ada/einfo.ads
gcc/ada/exp_ch6.adb
gcc/ada/exp_ch7.adb
gcc/ada/exp_util.adb