We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d033799 commit 2f5e255Copy full SHA for 2f5e255
flang/lib/Lower/ConvertCall.cpp
@@ -922,8 +922,10 @@ static PreparedDummyArgument preparePresentUserCallActualArgument(
922
// Handle procedure arguments (procedure pointers should go through
923
// prepareProcedurePointerActualArgument).
924
if (hlfir::isFortranProcedureValue(dummyType)) {
925
- // Procedure pointer actual to procedure dummy.
926
- if (actual.isProcedurePointer()) {
+ // Procedure pointer or function returns procedure pointer actual to
+ // procedure dummy.
927
+ if (actual.isProcedurePointer() ||
928
+ actual.getType().isa<fir::BoxProcType>()) {
929
actual = hlfir::derefPointersAndAllocatables(loc, builder, actual);
930
return PreparedDummyArgument{actual, /*cleanups=*/{}};
931
}
0 commit comments