[flang-commits] [flang] [Flang] Add partial support for lowering procedure pointer assignment. (PR #70461)
Daniel Chen via flang-commits
flang-commits at lists.llvm.org
Fri Nov 10 20:10:00 PST 2023
================
@@ -696,6 +696,8 @@ hlfir::Entity hlfir::derefPointersAndAllocatables(mlir::Location loc,
// or fir.class to hold bounds, dynamic type or length parameter
// information. Keep them boxed.
return boxLoad;
+ } else if (entity.isProcedurePointer()) {
+ return hlfir::Entity{builder.create<fir::LoadOp>(loc, entity)};
----------------
DanielCChen wrote:
@jeanPerier This change is currently for `procedure pointer => procedure pointer`. It is called from `genPointerAssignment`. So far, this is the only usage for this code as the other cases for pointer assignment, `procedure pointer => procedure` and `procedure pointer => null()` are handled inside of `genPointerAssignment`.
I am thinking to handle the argument passing in ConvertCall.cpp.
It seems there is not other usage for this change. Would it make sense to inline it in genPointerAssignment?
https://github.com/llvm/llvm-project/pull/70461
More information about the flang-commits
mailing list