[flang-commits] [flang] [flang] Fix `getTypeSizeAndAlignment` for packed/tail-padded `RecordType` and `TRANSFER` gate (PR #220377)

via flang-commits flang-commits at lists.llvm.org
Thu Sep 3 23:02:35 PDT 2026


================
@@ -556,6 +556,11 @@ std::string getTypeAsString(mlir::Type ty, const KindMapping &kindMap,
                             llvm::StringRef prefix = "");
 
 /// Return the size and alignment of FIR types.
+/// The returned size is the allocation size (including tail padding to the
----------------
MattPD wrote:

The header at `c5025ead076c` still exposes `bool storeSizeOnly` and directs callers to use it for the Fortran `STORAGE_SIZE` intrinsic. Could the next push add the separate API you described and document that its result excludes the outermost object's trailing padding and can differ from the intrinsic result?


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


More information about the flang-commits mailing list