[flang-commits] [flang] [Flang] Do not provide a shape operand for box addresses (PR #157732)

via flang-commits flang-commits at lists.llvm.org
Wed Sep 10 07:55:53 PDT 2025


https://github.com/jeanPerier commented:

Thanks for working on a fix!

I need to double check something with a more complex scenario here to verify this fix is OK.

Basically the root cause is that `genUnusedEntryPointBox()` is not called here in `Fortran::lower::mapSymbolAttributes` because of the static shape aspect and the code is falling down in a weird path a creating a fir.ref<fir.class> for a symbol that is expected to be a fir.class and genDeclareSymbol is then created with something weird/unexpected.

While your fix allows your example to compile, I am afraid that with cases where there are "protected uses" of the unused entry argument that would remain, not having an hlfir.declare with a fir.class argument would cause other troubles.

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


More information about the flang-commits mailing list