https://github.com/jeanPerier commented: Thanks for fixing this! I think a `fir::getFortranElementType` helper would be more useful in general than the one added in this patch, see comment inline. https://github.com/llvm/llvm-project/pull/126704