]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix wrong finalization of constrained subtype of unconstrained array type
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 6 May 2025 17:14:40 +0000 (19:14 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Thu, 3 Jul 2025 09:49:30 +0000 (11:49 +0200)
commitaa622ab8239cd5b957c1dd0ad777dcef13387252
treea1b48354bebb4b43645e148cc87a1e7345a9579f
parenta30e425255a3bde94b4669624903bee3f1f1662f
ada: Fix wrong finalization of constrained subtype of unconstrained array type

This implements the Is_Constr_Array_Subt_With_Bounds flag for allocators.

gcc/ada/ChangeLog:

* gcc-interface/trans.cc (gnat_to_gnu) <N_Allocator>: Allocate the
bounds alongside the data if the Is_Constr_Array_Subt_With_Bounds
flag is set on the designated type.
<N_Free_Statement>: Take into account the allocated bounds if the
Is_Constr_Array_Subt_With_Bounds flag is set on the designated type.
gcc/ada/gcc-interface/trans.cc