[flang-commits] [flang] [flang] Use the namelist item descriptor if it is local polymorphic entity. (PR #162701)
Daniel Chen via flang-commits
flang-commits at lists.llvm.org
Fri Oct 10 10:38:14 PDT 2025
DanielCChen wrote:
> > I have updated the patch and now it generates
> > ```
> > %[[V_14:[0-9]+]] = fir.convert %[[V_13]] : (!fir.class<!fir.heap<!fir.type<_QMmTbase{r1:f32}>>>) -> !fir.box<none>
> > ```
>
> Thanks for the update. You should still call createTemporary/associateMutableBox for polymorphic pointers. What needs to be changed is `boxType`, not `descRefTy`.
>
> Changing the type inside the tuple from a `fir.ref<fir.box>` into a `fir.box<none>` should change the runtime struct to contain a descriptor instdead of the address of a descriptor and that is not what the IO runtime expect I think.
I see. So you prefer to use the temporary rather than using its own descriptor.
I will update the patch.
https://github.com/llvm/llvm-project/pull/162701
More information about the flang-commits
mailing list