[flang-commits] [PATCH] D140153: [flang] Fix crash in name resolution
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Sat Dec 17 17:24:00 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7db05ae14d79: [flang] Fix crash in name resolution (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140153/new/
https://reviews.llvm.org/D140153
Files:
flang/lib/Semantics/resolve-names.cpp
Index: flang/lib/Semantics/resolve-names.cpp
===================================================================
--- flang/lib/Semantics/resolve-names.cpp
+++ flang/lib/Semantics/resolve-names.cpp
@@ -6359,14 +6359,16 @@
// This isn't a name in the current scope, it is in each TypeGuardStmt
MakePlaceholder(*name, MiscDetails::Kind::SelectTypeAssociateName);
association.name = &*name;
- auto exprType{association.selector.expr->GetType()};
if (ExtractCoarrayRef(association.selector.expr)) { // C1103
Say("Selector must not be a coindexed object"_err_en_US);
}
- if (exprType && !exprType->IsPolymorphic()) { // C1159
- Say(association.selector.source,
- "Selector '%s' in SELECT TYPE statement must be "
- "polymorphic"_err_en_US);
+ if (association.selector.expr) {
+ auto exprType{association.selector.expr->GetType()};
+ if (exprType && !exprType->IsPolymorphic()) { // C1159
+ Say(association.selector.source,
+ "Selector '%s' in SELECT TYPE statement must be "
+ "polymorphic"_err_en_US);
+ }
}
} else {
if (const Symbol *
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140153.483792.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221218/ec9fd500/attachment.bin>
More information about the flang-commits
mailing list