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

--- 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:cc17b1d02a9dae2528d16576411e62246ee8f945

commit r17-3421-gcc17b1d02a9dae2528d16576411e62246ee8f945
Author: Eric Botcazou <[email protected]>
Date:   Wed Aug 19 15:19:41 2026 +0200

    Ada: Fix assertion failure on nested formal packages with box notation

    The compiler is trying to instantiate a generic body for an instantiation
    present in a transient package that it has discarded.

    gcc/ada/
            PR ada/126928
            * sem_ch12.adb (In_Local_Package_Of_Formal_Package): New predicate.
            (Analyze_Package_Instantiation): Do not register the instantiation
            of the body if it is present in the local package of a formal one.
            (Need_Subprogram_Instance_Body): Likewise.

    gcc/testsuite/
            * gnat.dg/specs/generic_inst10.ads: New test.
            * gnat.dg/specs/generic_inst10_g1.ads: New helper.
            * gnat.dg/specs/generic_inst10_g2.ads: Likewise.
            * gnat.dg/specs/generic_inst10_g3.ads: Likewise.
            * gnat.dg/specs/generic_inst10_pkg.ads: Likewise.

Reply via email to