[all-commits] [llvm/llvm-project] 2b7a92: [flang] Improve USE merging of homonymous types, i...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Thu Jan 25 16:51:41 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2b7a928dd97476aac86fbae25a7a8e26b4ced738
https://github.com/llvm/llvm-project/commit/2b7a928dd97476aac86fbae25a7a8e26b4ced738
Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
Date: 2024-01-25 (Thu, 25 Jan 2024)
Changed paths:
M flang/include/flang/Semantics/symbol.h
M flang/include/flang/Semantics/tools.h
M flang/lib/Semantics/expression.cpp
M flang/lib/Semantics/resolve-names.cpp
M flang/lib/Semantics/symbol.cpp
M flang/lib/Semantics/tools.cpp
M flang/test/Semantics/resolve17.f90
M flang/test/Semantics/resolve18.f90
M flang/test/Semantics/symbol27.f90
Log Message:
-----------
[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.
More information about the All-commits
mailing list