Ada: Fix ineffective "use all" clause for type declared in nested package
This is an issue reported 10 years ago for a new feature introduced in the
language 20 years ago (Ada 2005): primitive subprograms of a type named in
an use-all-type clause are not seen as (potentially) use-visible if the type
is declared in a nested package, except in the specific case of enumeration
literals; the fix just extends the processing done for enumeration literals.
gcc/ada/
PR ada/64869
* sem_ch7.adb (Install_Private_Declarations): Also propagate the
Current_Use_Clause from partial to full view.
(Uninstall_Declarations): Extend implementation of RM 8.4(8.1/3)
subclause to all primitive subprograms.
gcc/testsuite/
* gnat.dg/use_type1.adb: New test.
* gnat.dg/use_type2.adb: Likewise.