File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,11 @@ class ProcedureRef {
248
248
ProcedureRef (ProcedureDesignator &&p, ActualArguments &&a,
249
249
bool hasAlternateReturns = false )
250
250
: proc_{std::move (p)}, arguments_{std::move (a)},
251
- hasAlternateReturns_{hasAlternateReturns} {}
251
+ hasAlternateReturns_{hasAlternateReturns} {
252
+ // Gathers necessary information to determine the need for copy-in and
253
+ // copy-out
254
+ DetermineCopyInOut ();
255
+ }
252
256
~ProcedureRef ();
253
257
static void Deleter (ProcedureRef *);
254
258
@@ -285,9 +289,9 @@ class ProcedureRef {
285
289
bool operator ==(const ProcedureRef &) const ;
286
290
llvm::raw_ostream &AsFortran (llvm::raw_ostream &) const ;
287
291
292
+ protected:
288
293
void DetermineCopyInOut ();
289
294
290
- protected:
291
295
ProcedureDesignator proc_;
292
296
ActualArguments arguments_;
293
297
Chevrons chevrons_;
Original file line number Diff line number Diff line change @@ -284,9 +284,6 @@ class CallerInterface : public CallInterface<CallerInterface> {
284
284
CallerInterface (const Fortran::evaluate::ProcedureRef &p,
285
285
Fortran::lower::AbstractConverter &c)
286
286
: CallInterface{c}, procRef{p} {
287
- // Ensure that procRef gathers necessary information to determine the
288
- // need for copy-in and copy-out
289
- const_cast <Fortran::evaluate::ProcedureRef &>(procRef).DetermineCopyInOut ();
290
287
declare ();
291
288
mapPassedEntities ();
292
289
actualInputs.resize (getNumFIRArguments ());
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ void ProcedureRef::DetermineCopyInOut() {
255
255
// Get folding context of the call site owner
256
256
FoldingContext &fc{proc_.GetSymbol ()->owner ().context ().foldingContext ()};
257
257
auto procInfo{characteristics::Procedure::Characterize (
258
- proc () , fc, /* emitError=*/ false )};
258
+ proc_ , fc, /* emitError=*/ true )};
259
259
if (!procInfo) {
260
260
return ;
261
261
}
You can’t perform that action at this time.
0 commit comments