]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix wrong finalization of constrained array derived from unconstrained
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 5 May 2025 14:59:13 +0000 (16:59 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 1 Jul 2025 08:29:39 +0000 (10:29 +0200)
commit579c431fa3728f1cb2d99df862ebf6c475cf01b2
tree726a8effef85a5859d8ef9cc7bde906873b0d05d
parent603ed2b3ef8c73a98b968d16f4791a7074fb42d9
ada: Fix wrong finalization of constrained array derived from unconstrained

The bug had been present for dynamically allocated objects since the first
rewrite of the finalization machinery more than a decade ago, and was then
propagated to statically declared objects by the recent rewrite.

gcc/ada/ChangeLog:

* exp_util.adb (Finalize_Address): Do not go to the root type for
array types.
gcc/ada/exp_util.adb