[PATCH] D88313: [flang] Failed call to CHECK() for call to ASSOCIATED(NULL())
Peter Klausler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 15 10:56:28 PDT 2020
klausler added inline comments.
================
Comment at: flang/lib/Evaluate/characteristics.cpp:437
+ return false;
+}
+
----------------
Could be
```
const auto *argObj{...}.
return argObj && argObj->type.type().IsTypelessIntrinsicArgument();
```
================
Comment at: flang/lib/Evaluate/intrinsics.cpp:1871
} else if (name == "associated") {
- if (const auto &arg{call.arguments[0]}) {
- if (const auto *expr{arg->UnwrapExpr()}) {
- if (const Symbol * symbol{GetLastSymbol(*expr)}) {
- ok = symbol->attrs().test(semantics::Attr::POINTER);
- // TODO: validate the TARGET= argument vs. the pointer
+ if (const auto &pointerArg{call.arguments[0]}) {
+ if (const auto *pointerExpr{pointerArg->UnwrapExpr()}) {
----------------
This block of code has grown to the point that it should be extracted into its own function, I think.
================
Comment at: flang/lib/Evaluate/tools.cpp:894
+ std::optional<parser::MessageFixedText> msg;
+ llvm::outs() << "In Check for procedure pointer assignment\n";
+ if (!lhsProcedure) {
----------------
Debugging code needs scrubbing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88313/new/
https://reviews.llvm.org/D88313
More information about the llvm-commits
mailing list