https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124106

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <[email protected]>:

https://gcc.gnu.org/g:be341d626ccdf70f4bc333e8587c91fb38556c0f

commit r16-7528-gbe341d626ccdf70f4bc333e8587c91fb38556c0f
Author: Eric Botcazou <[email protected]>
Date:   Mon Feb 16 10:17:30 2026 +0100

    Ada: Fix subpool dropped from allocator initialized by aggregate

    This plugs an annoying loophole, whereby the subpool indication present
    in an allocator is dropped in some circumstances, most notably when the
    allocator is initialized by an aggregate with defaulted components.

    gcc/ada/
            PR ada/124106
            * exp_ch4.adb (Expand_N_Allocator): Minor fix in commentary.
            (Expand_Allocator_Expression): Propagate the Subpool_Handle_Name
            of the original allocator onto the newly built allocators.
            * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Likewise.
            Use Preserve_Comes_From_Source to propagate Comes_From_Source.
            (Make_CPP_Constructor_Call_In_Allocator): Likewise.

    gcc/testsuite/
            * gnat.dg/subpools2.adb: New test.

Reply via email to