[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
Tue Nov 7 16:50:48 PST 2023
================
@@ -248,8 +248,12 @@ struct TypeBuilderImpl {
// links, the fir type is built based on the ultimate symbol. This relies
// on the fact volatile and asynchronous are not reflected in fir types.
const Fortran::semantics::Symbol &ultimate = symbol.GetUltimate();
- if (Fortran::semantics::IsProcedurePointer(ultimate))
- TODO(loc, "procedure pointers");
+
+ if (Fortran::semantics::IsProcedurePointer(ultimate)) {
+ Fortran::evaluate::ProcedureDesignator proc(ultimate);
+ return Fortran::lower::translateSignature(proc, converter);
----------------
DanielCChen wrote:
-- "I think the solution for this may just be to add some fir::factory::genNullBoxProc(builder, loc, boxProcType) helper in include/flang/Optimizer/Builder/FIRBuilder.h (similar to fir::factory::createUnallocatedBox for allocatable/pointers) so that this is hidden/centralized."
Exactly. I currently (local) have a new `createNullEmboxProc` that is inspired by `createUnallocatedBox` in `MutableBox.h`. I will move it to FIRBuilder.h as it is a more reasonable place.
I will look into the other suggestion later.
https://github.com/llvm/llvm-project/pull/70461
More information about the flang-commits
mailing list