From: Viljar Indus <in...@adacore.com> 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. Tested on x86_64-pc-linux-gnu, committed on master. --- 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 3a44149aeff..f58513d115f 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; -- 2.43.0