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

--- 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:33395b407031170dcf29a8727913d21efb890a40

commit r15-11780-g33395b407031170dcf29a8727913d21efb890a40
Author: Eric Botcazou <[email protected]>
Date:   Thu Nov 26 22:33:54 2026 +0100

    Ada: Fix wrong resolution for iterated expression of aggregate in instance

    This is a regression present on the mainline, 16 and 15 branches: the
global
    names present in the expression of an iterated component association inside
    an aggregate are incorrectly resolved in instances of a generic unit.

    This was fixed under PR ada/128723 in some contexts but not in all of them,
    because the global resolution performed in the generic unit may
subsequently
    be dropped in the instance.

    gcc/ada/
            PR ada/128723
            PR ada/129058
            * sem_aggr.adb (Resolve_Array_Aggregate.Resolve_Aggr_Expr):
            Copy the expression by means of New_Copy_Tree.
            (Resolve_Delta_Array_Aggregate): Likewise.

    gcc/testsuite/
            * gnat.dg/specs/aggr13.ads: New test.
            * gnat.dg/specs/aggr13_pkg.ads: New helper.

Reply via email to