================ @@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) { setSize(std::max(getSize(), Offset + Layout.getSize())); // Remember max struct/class alignment. + UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign); ---------------- hvdijk wrote:
The test case I added has a base class where the alignment is not the natural alignment; GCC uses the alignment here, not the natural alignment, and Compiler Explorer shows that MSVC agrees with GCC: https://godbolt.org/z/4qTY88EW1. The existing `arm-vfp16-arguments2.cpp` test that is updated covers the case where the alignment and natural alignment of the base class are the same. Thanks for the pointer to get spec clarification. I'll wait for you to confirm whether knowing that GCC and MSVC agree, you'd still like spec clarification; I can ask there tomorrow if you like. `BaseAlign` vs `PreferredBaseAlign` seems to only be relevant on AIX, unless I am missing something? But thanks, `BaseAlign` is probably better to use, the existing `UnadjustedAlignment = std::max(UnadjustedAlignment, FieldAlign);` also doesn't use `PreferredAlign`. I'll make that change tomorrow when I can confirm that it works as expected. https://github.com/llvm/llvm-project/pull/135564 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits