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

--- 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:ba7382a8444cb8f5dbff305bcfd49f60ce87b97a

commit r15-10821-gba7382a8444cb8f5dbff305bcfd49f60ce87b97a
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]>

Reply via email to