https://gcc.gnu.org/g:fe1e262fa75b1264663021628a47d216c353abe8
commit r16-1926-gfe1e262fa75b1264663021628a47d216c353abe8 Author: Viljar Indus <in...@adacore.com> Date: Thu May 29 10:54:30 2025 +0300 ada: Call Semantics when analyzing a renamed package Calling Semantics here will additionally update the reference to Current_Sem_Unit the renamed unit so that we will not receive bogus visibility errors when checking for self-referential with-s. gcc/ada/ChangeLog: * sem_ch10.adb(Analyze_With_Clause): Call Semantics instead of Analyze to bring Current_Sem_Unit up to date. Diff: --- gcc/ada/sem_ch10.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 3a44149aeffc..f58513d115fb 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -3299,7 +3299,7 @@ package body Sem_Ch10 is -- the renamed unit, and the renaming declaration itself has not -- been analyzed. - Analyze (Parent (Parent (Entity (Pref)))); + Semantics (Parent (Parent (Entity (Pref)))); pragma Assert (Renamed_Entity (Entity (Pref)) = Par_Name); Par_Name := Entity (Pref); end if;