aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Semantics/pointer-assignment.cpp
diff options
context:
space:
mode:
authorpeter klausler <pklausler@nvidia.com>2020-09-30 13:34:23 -0700
committerpeter klausler <pklausler@nvidia.com>2020-09-30 15:46:15 -0700
commit37b2e2b04cf434b368b1edf29609be21952316f9 (patch)
treeb4b74f4e325d2945679981a0aac2fa5bba07a32b /flang/lib/Semantics/pointer-assignment.cpp
parent5519e4da83d1abc66620334692394749eceb0e50 (diff)
downloadllvm-37b2e2b04cf434b368b1edf29609be21952316f9.zip
llvm-37b2e2b04cf434b368b1edf29609be21952316f9.tar.gz
llvm-37b2e2b04cf434b368b1edf29609be21952316f9.tar.bz2
[flang] Semantic analysis for FINAL subroutines
Represent FINAL subroutines in the symbol table entries of derived types. Enforce constraints. Update tests that have inadvertent violations or modified messages. Added a test. The specific procedure distinguishability checking code for generics was used to enforce distinguishability of FINAL procedures. (Also cleaned up some confusion and redundancy noticed in the type compatibility infrastructure while digging into that area.) Differential revision: https://reviews.llvm.org/D88613
Diffstat (limited to 'flang/lib/Semantics/pointer-assignment.cpp')
-rw-r--r--flang/lib/Semantics/pointer-assignment.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Semantics/pointer-assignment.cpp b/flang/lib/Semantics/pointer-assignment.cpp
index 58719de..735e842 100644
--- a/flang/lib/Semantics/pointer-assignment.cpp
+++ b/flang/lib/Semantics/pointer-assignment.cpp
@@ -219,7 +219,7 @@ bool PointerAssignmentChecker::Check(const evaluate::Designator<T> &d) {
" derived type when target is unlimited polymorphic"_err_en_US;
}
} else {
- if (!lhsType_->type().IsTypeCompatibleWith(rhsType->type())) {
+ if (!lhsType_->type().IsTkCompatibleWith(rhsType->type())) {
msg = MessageFormattedText{
"Target type %s is not compatible with pointer type %s"_err_en_US,
rhsType->type().AsFortran(), lhsType_->type().AsFortran()};