This patch fixes an issue in the compiler whereby a use_type_clause incorrectly gets flagged as ineffective when the use of it comes after a generic package instantiation where the installation of private use clauses are required and one such clause references the same type. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch8.adb (Use_One_Type): Remove code in charge of setting Current_Use_Clause when Id is known to be redundant, and modify the printing of errors associated with redundant use type clauses so that line number gets included in more cases.