[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
       
    Thu Oct  9 13:09:15 PDT 2025
    
    
  
jeanPerier wrote:
> The suspicious cast is also happening for the non-namelist I/O. If I changed the write statement to `write(10, *) b1`, I also got
> 
> ```
>     %8 = fir.load %4 : !fir.ref<!fir.class<!fir.heap<!fir.type<_QMmTbase{r1:f32}>>>>
>     %9 = fir.convert %8 : (!fir.class<!fir.heap<!fir.type<_QMmTbase{r1:f32}>>>) -> !fir.box<none>
Here the conversion is between different fir.box types, and that is OK for now/very common. Converting a fir.box value into the address of a fir.box is a lot more odd. It may have been allowed to deal with some OpenMP cases, but I do not want to generalize its usage.
https://github.com/llvm/llvm-project/pull/162701
    
    
More information about the flang-commits
mailing list