[flang] Improve USE merging of homonymous types, interfaces, and proc… (#79364)
…edures Fortran allows a generic interface to have the same name as a derived type in the same scope. It also allows a generic interface to have the same name as one of its specific procedures. When two modules define the same name, possibly more than once each, things get exciting. The standard is not clear, and other compilers do variously different things. We are currently emitting some errors prematurely for some usage in pfUnit due to how it combines two versions of a package together via USE association. This patch handles combinations of derived types and generic interfaces and their specific procedures in a more principled way. Errors due to ambiguity are deferred to actual usage of derived types and specific procedures -- and when they're not used, the program is unambiguous and no error issues.
parent
378c4d4a
Please register or sign in to comment