[flang] Create names to allow access to inaccessible specifics
authorpeter klausler <pklausler@nvidia.com>
Fri, 15 Jan 2021 19:52:10 +0000 (11:52 -0800)
committerpeter klausler <pklausler@nvidia.com>
Sat, 16 Jan 2021 00:56:38 +0000 (16:56 -0800)
commit1bd083b5d6d0619f532a7310e72887ea6d2e87eb
tree09e863f01eaa10f267f320a528f13e60e990b9c5
parentaa3d4d9939595295d19969c62077cc09e4823f58
[flang] Create names to allow access to inaccessible specifics

When a reference to a generic interface occurs in a specification
expression that must be emitted to a module file, we have a problem
when the generic resolves to a function whose name is inaccessible
due to being PRIVATE or due to a conflict with another use of the
same name in the scope.  In these cases, construct a new name for
the specific procedure and emit a renaming USE to the module file.
Also, relax enforcement of PRIVATE when analyzing module files.

Differential Revision: https://reviews.llvm.org/D94815
flang/include/flang/Semantics/expression.h
flang/include/flang/Semantics/semantics.h
flang/include/flang/Semantics/tools.h
flang/lib/Evaluate/check-expression.cpp
flang/lib/Semantics/expression.cpp
flang/lib/Semantics/resolve-names.cpp
flang/lib/Semantics/semantics.cpp
flang/lib/Semantics/tools.cpp
flang/test/Semantics/modfile39.f90 [new file with mode: 0644]