https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118208
--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- https://gcc.gnu.org/g:629f1de233948a06f1c9e0064b2c2804892a02e6 commit r16-3778-g629f1de233948a06f1c9e0064b2c2804892a02e6 Author: Bob Duff <[email protected]> Date: Wed Aug 20 14:07:14 2025 -0400 ada: Fix visibility bug related to target name This patch fixes the following bug: If the right-hand side of an expression contains a target name (i.e. "@"), and also contains a reference to a user-defined operator that is directly visible because of a "use type" clause on a renaming of the package where the operator is declared, the compiler gives an incorrect error saying that the renamed package is not visible. It turns out that setting Entity of resolved nodes is unnecessary and wrong; the fix is to simply remove that code. gcc/ada/ChangeLog: * exp_ch5.adb (Expand_Assign_With_Target_Names.Replace_Target): Remove code setting Entity to Empty. * sinfo.ads (Has_Target_Names): Improve comment: add "@" to clarify what "target name" means, and remove the content-free phrase "and must be expanded accordingly."
