]> gcc.gnu.org Git - gcc.git/commit
ada: Fix premature finalization of temporaries for interface objects
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 6 Jan 2023 12:24:18 +0000 (13:24 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 16 Jan 2023 14:44:55 +0000 (15:44 +0100)
commit00fdfe9de2e2205330f312364b3b60fca3005b61
treee184f11e8bb2c22477b6d8078b7c6faf314a4e83
parent1f038e845bbdeae9dddf1810fb3e6c9ad1b79f13
ada: Fix premature finalization of temporaries for interface objects

This restores the proper finalization of temporaries for interface objects
in the case where the initializing expression is not of an interface type.

It turns out that neither Is_Temporary_For_Interface_Object nor its previous
incarnation are sufficient to catch all the various cases, so it is replaced
by a small enhancement to Is_Aliased, which is more robust.

gcc/ada/

* exp_util.adb (Is_Temporary_For_Interface_Object): Delete.
(Is_Finalizable_Transient.Is_Aliased): Deal with the specific case
of temporaries generated for interface objects.
gcc/ada/exp_util.adb
This page took 0.068169 seconds and 6 git commands to generate.