[PATCH] D83063: [flang] Fix bug determining alternate return

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 11:19:54 PDT 2020


tskeith created this revision.
tskeith added reviewers: schweitz, jeanPerier.
tskeith added a project: Flang.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The arguments have been moved out of the analyzer so we can't get the
expected number there. Instead use the argument count from the newly
built callee.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83063

Files:
  flang/lib/Semantics/expression.cpp


Index: flang/lib/Semantics/expression.cpp
===================================================================
--- flang/lib/Semantics/expression.cpp
+++ flang/lib/Semantics/expression.cpp
@@ -2018,7 +2018,7 @@
       CHECK(proc);
       if (CheckCall(call.source, *proc, callee->arguments)) {
         bool hasAlternateReturns{
-            analyzer.GetActuals().size() < actualArgList.size()};
+            callee->arguments.size() < actualArgList.size()};
         callStmt.typedCall.reset(new ProcedureRef{std::move(*proc),
             std::move(callee->arguments), hasAlternateReturns});
       }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83063.275167.patch
Type: text/x-patch
Size: 602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/486cf1f9/attachment.bin>


More information about the llvm-commits mailing list