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

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

https://gcc.gnu.org/g:010d21bec0be3cb0383bea3c49c0ba9daadc5cc5

commit r16-10023-g010d21bec0be3cb0383bea3c49c0ba9daadc5cc5
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