projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b8df08
)
[flang] Avoid null pointer dereference
author
peter klausler
<pklausler@nvidia.com>
Wed, 3 Jul 2019 22:16:36 +0000
(15:16 -0700)
committer
peter klausler
<pklausler@nvidia.com>
Wed, 3 Jul 2019 23:00:25 +0000
(16:00 -0700)
Original-commit: flang-compiler/f18@
3c108c0edcdbf67e75039ddcefba74598905e87c
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
Tree-same-pre-rewrite: false
flang/lib/evaluate/type.cc
patch
|
blob
|
history
diff --git
a/flang/lib/evaluate/type.cc
b/flang/lib/evaluate/type.cc
index
047e3b7
..
f98cdcc
100644
(file)
--- a/
flang/lib/evaluate/type.cc
+++ b/
flang/lib/evaluate/type.cc
@@
-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_);