[flang-commits] [flang] [llvm] [flang] Fix ICE when lowering IBM vector() array through fir.box (PR #214219)

Daniel Chen via flang-commits flang-commits at lists.llvm.org
Sun Aug 9 17:28:37 PDT 2026


DanielCChen wrote:

@eugeneepshteyn @kkwli @jeanPerier 
Hello reviewers,
I would like to clarify my intent for this PR.

This PR has two commits:

**Commit 1** (`b56910a`) fixes an ICE when lowering an IBM vector() array through `fir.box` — this is blocking our internal testing and needs to be fixed.

**Commit 2** (`d23287cf`) was inspired by @eugeneepshteyn's test reducer and demonstrates how to implement full addendum support for vector types in `class(*)` descriptors (e.g., `same_type_as`, `allocate(source=...)`). However, since flang currently does not support allocatable, pointer, assumed-shape, assumed-rank, or any runtime descriptor involved feature for vector types — and IBM does not plan to add such support in the near future — there is no practical scenario requiring a runtime descriptor for vector types today. Commit 1 has no dependency on commit 2 and does not block any future extension in this area. Therefore, I do not plan to land commit 2.

@kkwli has posted PR #193290 a while ago to fix the same ICE. His first commit is identical to the first commit of this PR. However, the additional `isVectorType_` flag and related runtime/semantics changes in that PR are not necessary unless a vector type appears in a runtime descriptor context such as `class(*)`/`same_type_as`/`allocatable`/`pointer` etc. that calls `Descriptor::Establish(const DerivedType &, ...)` — which we are explicitly not pursuing.

**Conclusion:** only the change in commit 1 needs to land. I will discuss with @kkwli to determine which PR — this one or #193290 — we use for that.

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


More information about the flang-commits mailing list