Skip to content

Commit b081e9d

Browse files
authored
[Flang] Fix NULLIFY statement that returns too early for multiple procedure pointer objects. (#81164)
The current code that handles NULLIFY statement for procedure pointer returns after the 1st object. This PR is to remove the `return` so it can nullify multiple procedure pointer objects.
1 parent fdb16e6 commit b081e9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flang/lib/Lower/Bridge.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,10 +3115,10 @@ class FirConverter : public Fortran::lower::AbstractConverter {
31153115
hlfir::Entity nullBoxProc(
31163116
fir::factory::createNullBoxProc(*builder, loc, boxTy));
31173117
builder->createStoreWithConvert(loc, nullBoxProc, pptr);
3118-
return;
3118+
} else {
3119+
fir::MutableBoxValue box = genExprMutableBox(loc, *expr);
3120+
fir::factory::disassociateMutableBox(*builder, loc, box);
31193121
}
3120-
fir::MutableBoxValue box = genExprMutableBox(loc, *expr);
3121-
fir::factory::disassociateMutableBox(*builder, loc, box);
31223122
}
31233123
}
31243124

0 commit comments

Comments
 (0)