Fix regression after https://github.com/llvm/llvm-project/pull/193689 when a use_device is referring to variables from a host module. The original symbol needs to be visited in the PFT so that it will be instantiated, but it is not visible anymore from the parse tree, and not directly connected to the new symbol (this is because variables in use_device are treated in a special way in order to give them the DEVICE attribute, other data clause do not need such handling). Look into the parent scope for a symbol with the same name and visit it.
8.9 KiB
8.9 KiB