https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124106
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Eric Botcazou <[email protected]>: https://gcc.gnu.org/g:5dd4b922bb341aa3b821e600ff2e46aa6ed6e850 commit r15-10830-g5dd4b922bb341aa3b821e600ff2e46aa6ed6e850 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.
