https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123867
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Eric Botcazou <[email protected]>: https://gcc.gnu.org/g:28e8b195c51c0ea0806ea6dc79534f29b06fa0e4 commit r14-12287-g28e8b195c51c0ea0806ea6dc79534f29b06fa0e4 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.
