Skip to content

Commit 527b2d7

Browse files
DetermineCopyInOut() is now called at ProcedureRef instantiation
1 parent b914f79 commit 527b2d7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

flang/include/flang/Evaluate/call.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ class ProcedureRef {
249249
bool hasAlternateReturns = false)
250250
: proc_{std::move(p)}, arguments_{std::move(a)},
251251
hasAlternateReturns_{hasAlternateReturns} {
252-
// Gathers necessary information to determine the need for copy-in and
253-
// copy-out
254-
DetermineCopyInOut();
255252
}
256253
~ProcedureRef();
257254
static void Deleter(ProcedureRef *);
@@ -289,9 +286,9 @@ class ProcedureRef {
289286
bool operator==(const ProcedureRef &) const;
290287
llvm::raw_ostream &AsFortran(llvm::raw_ostream &) const;
291288

292-
protected:
293289
void DetermineCopyInOut();
294290

291+
protected:
295292
ProcedureDesignator proc_;
296293
ActualArguments arguments_;
297294
Chevrons chevrons_;

flang/lib/Semantics/expression.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3455,6 +3455,7 @@ void ExpressionAnalyzer::Analyze(const parser::CallStmt &callStmt) {
34553455
HasAlternateReturns(callee->arguments)},
34563456
ProcedureRef::Deleter);
34573457
DEREF(callStmt.typedCall.get()).set_chevrons(std::move(*chevrons));
3458+
DEREF(callStmt.typedCall.get()).DetermineCopyInOut();
34583459
return;
34593460
}
34603461
}

0 commit comments

Comments
 (0)