https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52319
--- Comment #5 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:2dd0e7ff60e1d8756c7d2c5f99b9dbe541fcf546 commit r16-4517-g2dd0e7ff60e1d8756c7d2c5f99b9dbe541fcf546 Author: Eric Botcazou <[email protected]> Date: Mon Oct 20 20:48:39 2025 +0200 Ada: Fix use type clause invalidated by use clause in nested package This is an old issue, whereby a use type clause is partially invalidated by a use clause in a nested package, a variant of PR ada/64869 recently fixed. The problem occurs only for unusual primitive operators because of a small oversight in the implementation. The fix simply aligns this implementation with the one exercised by PR ada/64869, which is more robust. gcc/ada/ PR ada/52319 * sem_ch7.adb (Uninstall_Declarations): Use direct test on Nkind to spot operators. * sem_ch8.adb (End_Use_Package): Also test the Etype of operators to spot those which are primitive operators of use-visible types. gcc/testsuite/ * gnat.dg/use_type3.adb: New test.
