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

--- Comment #4 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:3b57dbcdeff0ec2366267377fb49438ba7e909c5

commit r17-6744-g3b57dbcdeff0ec2366267377fb49438ba7e909c5
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