Hi Mikael, You were absolutely right. I looked at the caller and "just didn't get it". Thanks. I will resubmit when I get back from a business trip.
Cordialement Paul On Sat, 27 Jul 2024 at 12:35, Mikael Morin <morin-mik...@orange.fr> wrote: > Hello, > > Le 27/07/2024 à 11:25, Paul Richard Thomas a écrit : > > This patch is straightforward but I am still puzzled as to why it is > > necessary for the particular case. Having looked at all the other chunks > > of frontend code involving use renaming, it seems that the process just > > works everywhere else. I tried putting the new code in gfc_find_symtree > > but it caused some regressions unless I pinned it down to the specific > > case of a structure constructor. > > > I think it works as expected, symtrees have the local names, and symbols > the original name, so if all that is available is the symbol, name > lookup may not work correctly with renaming. And I think that there are > other places where it happens. > > In this case, it seems the caller can provide the local name, which > would avoid processing the use statements. Did you try that? > > Mikael >