https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109472
--- Comment #2 from Marc Poulhiès <dkm at gcc dot gnu.org> --- Regression starts from: a8d17a88a52d2f773423adb55399d23ed5ea03c8 is the first bad commit commit a8d17a88a52d2f773423adb55399d23ed5ea03c8 Author: Piotr Trojanek <troja...@adacore.com> Date: Tue Jun 21 10:17:57 2022 +0200 [Ada] Warn on unset objects in packages with no bodies Fix an inconsistency, where GNAT was warning about references to unset objects inside generic packages with no bodies but not inside ordinary packages with no bodies. But the issue is probably not this particular change, that simply asks gnat to warn on unreferenced entities. The error is most probably caused by the Referenced(N) that returns False for 'X' entity.