[flang-commits] [flang] [flang] Carry over alignment computed by frontend for COMMON (PR #94280)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Tue Jun 4 08:08:20 PDT 2024
================
@@ -1307,7 +1307,10 @@ declareCommonBlock(Fortran::lower::AbstractConverter &converter,
auto vecTy = mlir::VectorType::get(sz, i8Ty);
mlir::Attribute zero = builder.getIntegerAttr(i8Ty, 0);
auto init = mlir::DenseElementsAttr::get(vecTy, llvm::ArrayRef(zero));
- builder.createGlobal(loc, commonTy, commonName, linkage, init);
+ global = builder.createGlobal(loc, commonTy, commonName, linkage, init);
+ if (const auto *details =
+ common.detailsIf<Fortran::semantics::CommonBlockDetails>())
----------------
clementval wrote:
It should. I updated the code to always get the details and added an assertion.
https://github.com/llvm/llvm-project/pull/94280
More information about the flang-commits
mailing list