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

--- Comment #7 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:28a10da664ee496b5c7f774b173100c8a22cbef3

commit r16-4720-g28a10da664ee496b5c7f774b173100c8a22cbef3
Author: Eric Botcazou <[email protected]>
Date:   Thu Oct 30 00:06:00 2025 +0100

    Ada: Fix instantiation failure with qualified name of child generic unit

    This is again an issue with multiple levels of nested instances, and it
    arises because the qualified name of the problematic child generic unit
    is used (this works fine with the direct name), exposing the rather
    questionable processing implemented for instances in Find_Expanded_Name.

    The patch replaces this processing with the straightforward decoding of
    the renaming scheme used in Sem_Ch12.

    gcc/ada/
            PR ada/16214
            * sem_ch8.adb (Find_Expanded_Name): Consolidate and streamline the
            processing required for references to instances within themselves.

    gcc/testsuite/
            * gnat.dg/specs/generic_inst6.ads: New test.
            * gnat.dg/specs/generic_inst6_pkg1-child.ads: New helper.
            * gnat.dg/specs/generic_inst6_pkg1-child-grand1.ads: Likewise.
            * gnat.dg/specs/generic_inst6_pkg1-child-grand2.ads: Likewise.
            * gnat.dg/specs/generic_inst6_pkg1.ads: Likewise.
            * gnat.dg/specs/generic_inst6_pkg2.ads: Likewise.
            * gnat.dg/specs/generic_inst6_pkg3.ads: Likewise.

Reply via email to