]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Add minimal support for address clause/aspect on controlled objects
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 12 Nov 2024 18:46:12 +0000 (19:46 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 26 Nov 2024 09:49:36 +0000 (10:49 +0100)
commit84d8a383c9fe80bd9c4e364505247ef025e1c2b6
treefae9357431a776897b7c8593c4290576bea77eb4
parent936f9f1d159bd6ef3b1e25e72a6abd1c0fff10b1
ada: Add minimal support for address clause/aspect on controlled objects

The clause and aspect have been accepted by the compiler for a few years,
but the result is generally an internal compiler error or an incorrect
finalization at run time.

gcc/ada/ChangeLog:

* exp_ch3.adb (Expand_N_Object_Declaration): Do not insert the tag
assignment there if the object has the Address aspect.
* exp_ch7.adb: Add clauses for Aspect package.
(Build_Finalizer.Process_Object_Declaration): Deal with an object
with delayed freezing.
(Insert_Actions_In_Scope_Around): If the target is the declaration
of an object with address clause or aspect, move all the statements
that have been inserted after it into the Initialization_Statements
list of the object.
* freeze.adb (Check_Address_Clause): Do not reassign the tag here,
instead set the appropriate flag on the assignment statement.
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch7.adb
gcc/ada/freeze.adb