diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-09-14 16:42:45 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-09-26 13:43:18 +0200 |
commit | 2e135bdb28d386b0cda2ee7e35338ad06136042d (patch) | |
tree | 3b154e2141b0e904d40a868effd6095403b2fc8a /gcc/ada/einfo.ads | |
parent | 198e643b35df4743e3177fc3a77b50325ae44717 (diff) | |
download | gcc-2e135bdb28d386b0cda2ee7e35338ad06136042d.zip gcc-2e135bdb28d386b0cda2ee7e35338ad06136042d.tar.gz gcc-2e135bdb28d386b0cda2ee7e35338ad06136042d.tar.bz2 |
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.
Diffstat (limited to 'gcc/ada/einfo.ads')
-rw-r--r-- | gcc/ada/einfo.ads | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 9773928..9165fb7 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -4518,11 +4518,11 @@ package Einfo is -- Status_Flag_Or_Transient_Decl -- Defined in constant, loop, and variable entities. Applies to objects -- that require special treatment by the finalization machinery, such as --- extended return results, IF and CASE expression results, and objects +-- extended return objects, conditional expression results, and objects -- inside N_Expression_With_Actions nodes. The attribute contains the --- entity of a flag which specifies particular behavior over a region of --- code or the declaration of a "hook" object. --- In which case is it a flag, or a hook object??? +-- entity of a flag which specifies a particular behavior over a region +-- of the extended return for the return objects, or the declaration of a +-- hook object for conditional expressions and N_Expression_With_Actions. -- Storage_Size_Variable [implementation base type only] -- Defined in access types and task type entities. This flag is set |