[flang-commits] [flang] 70f2bcc - [flang] Fix bug determining alternate return
Tim Keith via flang-commits
flang-commits at lists.llvm.org
Thu Jul 2 12:24:49 PDT 2020
Author: Tim Keith
Date: 2020-07-02T12:24:35-07:00
New Revision: 70f2bcc197ebc8d1c77c5efd5b822a9c9ccdccc4
URL: https://github.com/llvm/llvm-project/commit/70f2bcc197ebc8d1c77c5efd5b822a9c9ccdccc4
DIFF: https://github.com/llvm/llvm-project/commit/70f2bcc197ebc8d1c77c5efd5b822a9c9ccdccc4.diff
LOG: [flang] Fix bug determining alternate return
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.
Differential Revision: https://reviews.llvm.org/D83063
Added:
Modified:
flang/lib/Semantics/expression.cpp
Removed:
################################################################################
diff --git a/flang/lib/Semantics/expression.cpp b/flang/lib/Semantics/expression.cpp
index 733ef32f752a..9914b5717c19 100644
--- a/flang/lib/Semantics/expression.cpp
+++ b/flang/lib/Semantics/expression.cpp
@@ -2018,7 +2018,7 @@ void ExpressionAnalyzer::Analyze(const parser::CallStmt &callStmt) {
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});
}
More information about the flang-commits
mailing list