================ @@ -1687,7 +1687,8 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const { if (VD->hasGlobalStorage() && !ForAlignof) { uint64_t TypeSize = !BaseT->isIncompleteType() ? getTypeSize(T.getTypePtr()) : 0; - Align = std::max(Align, getTargetInfo().getMinGlobalAlign(TypeSize)); + Align = std::max(Align, getTargetInfo().getMinGlobalAlign( + TypeSize, VD->hasDefinition())); ---------------- Andreas-Krebbel wrote:
Hi. I've just committed a fix for GCC to handle weak symbols correctly with -munaligned-symbols: https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640893.html https://github.com/llvm/llvm-project/pull/73511 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits