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.