[flang] Fix edge case in USE-associated generics
It is generally an error when a USE-associated name clashes with a name defined locally, but not in all cases; a generic interface can be both USE-associated and locally defined. This works, but not when there is also a local subprogram with the same name, which is valid when that subprogram is a specific of the local generic. A bogus error issues at the point of the USE because name resolution will have already defined a symbol for the local subprogram. The solution is to collect the names of local generics when creating the program tree, and then create their symbols as well if their names are also local subprograms, prior to any USE association processing. Differential Revision: https://reviews.llvm.org/D119566
Loading
Please sign in to comment