forked from OSchip/llvm-project
[flang] Avoid null pointer dereference
Original-commit: flang-compiler/f18@3c108c0edc Reviewed-on: https://github.com/flang-compiler/f18/pull/553 Tree-same-pre-rewrite: false
This commit is contained in:
parent
6b8df08cad
commit
d1de4fe462
|
@ -174,7 +174,7 @@ bool DynamicType::IsTkCompatibleWith(const DynamicType &that) const {
|
|||
} else if (!derived_ || !that.derived_ ||
|
||||
!IsKindCompatible(*derived_, *that.derived_)) {
|
||||
return false; // kind params don't match
|
||||
} else if (!IsPolymorphic()) {
|
||||
} else if (!IsPolymorphic() && that.derived_ != nullptr) {
|
||||
return derived_->typeSymbol() == that.derived_->typeSymbol();
|
||||
} else {
|
||||
return IsAncestorTypeOf(derived_, that.derived_);
|
||||
|
|
Loading…
Reference in New Issue