[flang-commits] [flang] [flang] Preserve dynamic length of characters in ALLOCATE (PR #152564)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Thu Aug 14 13:53:03 PDT 2025


luporl wrote:

> Is this only showing up with OpenMP?

Yes, I couldn't reproduce the issue without OpenMP.

It uses `Fortran::lower::genDeclareSymbol()` to declare privatized variables, but the typeparam of the original declare is lost for `character(<variable>)` types.
This is usually not a problem, since the length can be read from the corresponding box, but `allocate` clears it.

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


More information about the flang-commits mailing list