[flang-commits] [flang] [flang] Fix RecordType sizes, TRANSFER lowering, and BIND(C) ABI on SystemZ/PPC64le (PR #220377)
via flang-commits
flang-commits at lists.llvm.org
Mon Sep 7 00:43:30 PDT 2026
================
@@ -31,6 +31,48 @@ page](https://llvm.org/releases/).
## Bug Fixes
+- Fixed `fir::getTypeSizeAndAlignment` returning the wrong allocation size for
+ **packed derived types** (`SEQUENCE` types compiled with `PACK` / LLVM
+ packed-struct layout). Fields in a packed struct are placed back-to-back
+ using each component's allocation size (`alignTo(storeSize, ABIalign)`), not
+ its raw store size, and the struct ABI alignment is 1. For example, a packed
+ `{f80, i8}` on x86-64 now correctly reports 17 bytes instead of 11.
----------------
MattPD wrote:
The release-note example now shows the size changing from 16 bytes to 12 bytes. The PR body and the message for commit `487b242e` still say that the packed `{f80,i8}` size changed from 11 bytes to 17 bytes. `getTypeSizeAndAlignment` already returned a size of 17 bytes and an alignment of 16 bytes before this patch.
Could the PR body and the message for commit `487b242e` carry the same correction?
https://github.com/llvm/llvm-project/pull/220377
More information about the flang-commits
mailing list