https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124054
--- 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:f474ff7fc758482bb5222d989a7ff6ffd079b4a6 commit r16-7453-gf474ff7fc758482bb5222d989a7ff6ffd079b4a6 Author: Eric Botcazou <[email protected]> Date: Wed Feb 11 11:38:24 2026 +0100 Ada: Fix internal error on access attribute used as subpool in allocator This is a regression present for quite a long time: the compiler aborts on an allocator whose subpool name is an access attribute and when an allocation procedure must be generated, for example when the allocation is controlled. The fix is to do what is done elsewhere in Build_Allocate_Deallocate_Proc, that is to say pass the allocation procedure as the new scope in the call to the New_Copy_Tree function. gcc/ada/ PR ada/124054 * exp_util.adb (Build_Allocate_Deallocate_Proc): Tidy up and pass Proc_Id as the new scope in the call to the New_Copy_Tree function. gcc/testsuite/ * gnat.dg/allocator4.adb: New test. Co-authored-by: Liam Powell <[email protected]>
