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

--- Comment #8 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:a697c8115b8b5d7c7bf3bc066a38765ee18e76c9

commit r16-9820-ga697c8115b8b5d7c7bf3bc066a38765ee18e76c9
Author: Eric Botcazou <[email protected]>
Date:   Thu Oct 22 19:12:57 2026 +0200

    Ada: Fix fully qualified name wrongly resolved in instance of generic child

    This is a regression present on the mainline and 16 branch, introduced by
    the recent removal of an old kludge from Sem_Ch8.Premature_Usage that was
    salvaging the incorrect resolution of a fully qualified name in the
instance
    of a generic child unit that is a homonym of one of its parents.  It turns
    out that the incorrect resolution comes from another old kludge present in
    Save_Global_References that short-circuits the normal resolution
implemented
    in Find_Expanded_Name.

    gcc/ada/
            PR ada/128044
            * sem_ch12.adb (Save_Global_References.Reset_Entity): Remove old
            kludge short-circuiting the resolution of expanded names.

    gcc/testsuite/
            * gnat.dg/specs/generic_inst11.ads: New test.
            * gnat.dg/specs/generic_inst11_pkg.ads: New helper package.
            * gnat.dg/specs/generic_inst11_pkg-g1.ads: Likewise.
            * gnat.dg/specs/generic_inst11_pkg-g1-parser.ads: Likewise.
            * gnat.dg/specs/generic_inst11_pkg-g1-parser-g2.ads: Likewise.
            * gnat.dg/specs/generic_inst11_pkg-g1-parser-g2-parser.ads:
Likewise

Reply via email to