[flang-commits] [PATCH] D140143: [flang] Prevent crash in error case: elemental with alternate return

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Dec 16 16:46:11 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG290cc4fe17e1: [flang] Prevent crash in error case: elemental with alternate return (authored by klausler).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140143/new/

https://reviews.llvm.org/D140143

Files:
  flang/lib/Semantics/check-call.cpp


Index: flang/lib/Semantics/check-call.cpp
===================================================================
--- flang/lib/Semantics/check-call.cpp
+++ flang/lib/Semantics/check-call.cpp
@@ -891,7 +891,7 @@
   int index{0};
   bool hasArrayArg{false};
   for (const auto &arg : actuals) {
-    if (arg && arg.value().Rank() > 0) {
+    if (arg && !arg->isAlternateReturn() && arg->Rank() > 0) {
       hasArrayArg = true;
       break;
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140143.483695.patch
Type: text/x-patch
Size: 444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221217/210afb02/attachment-0001.bin>


More information about the flang-commits mailing list