]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix pragma Import ignored in conjunction with address aspect
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 16 Jun 2026 16:28:01 +0000 (18:28 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 29 Jun 2026 11:17:12 +0000 (13:17 +0200)
commitb75cf42fb1e2d49fe8e856496a8df35d2029c9dc
treeab8204588986590de29e19d927d7b2bbc50210a7
parent37ebb43231ca61e65364128baafcc0dec89ac08f
ada: Fix pragma Import ignored in conjunction with address aspect

The special mechanism used to "deinitialize" an object in the presence of
a pragma Import works in conjunction with an address clause, but not with
an address aspect.  This tweaks the expansion so as to plug this loophole.

gcc/ada/ChangeLog:

* einfo.ads (Initialization_Statements): Adjust description.
* exp_ch3.adb (Default_Initialize_Object): Use the special mechanism
of Initialization_Statements, if need be, instead of inserting the
initialization statements directly into the freeze actions.
gcc/ada/einfo.ads
gcc/ada/exp_ch3.adb