[flang-commits] [flang] [flang] Extension: Allow POINTER, INTENT(IN) passed objects (PR #172175)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Mon Dec 15 09:22:51 PST 2025
klausler wrote:
> @klausler, did you verify some end-to-end compilations?
>
> I think lowering may be assuming that passed object are not pointers/allocatables in some contexts (the handling of those is a bit special since the related designators are only lower once for two purposes (being an argument and retrieving the dynamic type).
>
> For instance, I think calling procedure pointer components with passed object would lack the object pointer deference currently (note for lowering updating, pointer dereference is likely missing [here](https://github.com/llvm/llvm-project/blob/5785b4a4fb29f4e3e38de628d5be8fc8770d81fd/flang/lib/Lower/ConvertProcedureDesignator.cpp#L106)).
>
> [edit: deref of passed argument also needed before generating fir.dispatch [here](https://github.com/llvm/llvm-project/blob/a5bfe8e5c3c4c5bb46f53e093caf6aa01d56aeab/flang/lib/Lower/ConvertCall.cpp#L678)].
I'll add lowering tests. Your comment is not clear to me. In `X%TBP()`, `X` can be a pointer or allocatable or neither today, and that is not changing.
https://github.com/llvm/llvm-project/pull/172175
More information about the flang-commits
mailing list