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

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

https://gcc.gnu.org/g:86e5c7dbf45327ca7b73175b9ebc281652c8e89b

commit r15-10757-g86e5c7dbf45327ca7b73175b9ebc281652c8e89b
Author: Eric Botcazou <[email protected]>
Date:   Fri Jan 30 11:58:58 2026 +0100

    Ada: Fix spurious visibility error from limited_with clause in hierarchy

    The problem is that the compiler installs the limited view of a package
that
    is already installed by the virtue of being an ancestor of the main unit.

    gcc/ada/
            PR ada/123867
            * sem_ch10.adb (Analyze_Compilation_Unit): Output info message
            when -gnatdi is specified.
            (Install_Parents): Likewise.  Set the Is_Visible_Lib_Unit flag
            on the unit.
            (Install_Private_With_Clauses): Do not output info message here.
            (Remove_Parents): Output info message when -gnatdi is specified
            and clear the Is_Visible_Lib_Unit flag on the unit.

    gcc/testsuite/
            * gnat.dg/specs/limited_with3.ads: New test.
            * gnat.dg/specs/limited_with3-child.ads: New helper.
            * gnat.dg/specs/limited_with3-child-grandchild.ads: Likewise.
            * gnat.dg/specs/limited_with3-child-grandchild-grandgrandchild.ads:
            Likewise.

Reply via email to