@@ -662,7 +662,8 @@ class FirConverter : public Fortran::lower::AbstractConverter {
662
662
assert (stmt.typedCall && " Call was not analyzed" );
663
663
// Call statement lowering shares code with function call lowering.
664
664
Fortran::semantics::SomeExpr expr{*stmt.typedCall };
665
- auto res = createFIRExpr (toLocation (), &expr, stmtCtx);
665
+ auto res = Fortran::lower::createSubroutineCall (
666
+ *this , expr, localSymbols, stmtCtx, /* isUserDefAssignment=*/ false );
666
667
if (!res)
667
668
return ; // "Normal" subroutine call.
668
669
// Call with alternate return specifiers.
@@ -1939,11 +1940,13 @@ class FirConverter : public Fortran::lower::AbstractConverter {
1939
1940
[&](const Fortran::evaluate::ProcedureRef &procRef) {
1940
1941
if (implicitIterationSpace ())
1941
1942
TODO (loc, " user defined assignment within WHERE" );
1943
+
1942
1944
Fortran::semantics::SomeExpr expr{procRef};
1943
- createFIRExpr (toLocation (), &expr,
1944
- explicitIterationSpace ()
1945
- ? explicitIterSpace.stmtContext ()
1946
- : stmtCtx);
1945
+ auto &ctx = explicitIterationSpace ()
1946
+ ? explicitIterSpace.stmtContext ()
1947
+ : stmtCtx;
1948
+ Fortran::lower::createSubroutineCall (
1949
+ *this , expr, localSymbols, ctx, /* isUserDefAssignment=*/ true );
1947
1950
},
1948
1951
1949
1952
// [3] Pointer assignment with possibly empty bounds-spec. R1035: a
0 commit comments