[flang-commits] [flang] [flang] Rework component KIND= values in PDT instantiations (PR #162367)

Daniel Chen via flang-commits flang-commits at lists.llvm.org
Wed Oct 8 13:14:14 PDT 2025


DanielCChen wrote:

But referencing `i1%kind` is fine as
```
   type base
     character(2) :: c1
     integer(2) :: i1
     character(i1%kind) :: c2
     character(c1%len) :: c3
   end type
   type(base) :: b1
   print*, b1%c1%len
   print*, b1%c2%len
   print*, b1%c3%len
end
```

Also, it seems the `b1%c2%len` is wrong. 

It should be `2` but Flang outputs `4`.

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


More information about the flang-commits mailing list