[flang-commits] [flang] [flang] Use the namelist item descriptor if it is local polymorphic entity. (PR #162701)

via flang-commits flang-commits at lists.llvm.org
Fri Oct 10 00:15:10 PDT 2025


jeanPerier 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.

https://github.com/llvm/llvm-project/pull/162701


More information about the flang-commits mailing list