[committed] d: Align methods to MINIMUM_METHOD_BOUNDARY.
Iain Buclaw
ibuclaw@gdcproject.org
Fri Dec 10 01:16:55 GMT 2021
Hi,
This patch aligns all D defined methods to MINIMUM_METHOD_BOUNDARY,
improving interoperability with C++ methods.
Bootstrapped and regression tested on x86_64-linux-gnu, committed to
mainline and backported to the release branches.
Regards,
Iain.
gcc/d/ChangeLog:
* decl.cc (get_symbol_decl): Align methods to MINIMUM_METHOD_BOUNDARY.
---
gcc/d/decl.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc
index a4976b68bf0..55c65759d65 100644
--- a/gcc/d/decl.cc
+++ b/gcc/d/decl.cc
@@ -1248,6 +1248,9 @@ get_symbol_decl (Declaration *decl)
DECL_VINDEX (decl->csym) = size_int (fd->vtblIndex);
DECL_VIRTUAL_P (decl->csym) = 1;
}
+
+ /* Align method to the specified target boundary. */
+ SET_DECL_ALIGN (decl->csym, MINIMUM_METHOD_BOUNDARY);
}
else if (fd->isMain () || fd->isCMain ())
{
--
2.30.2
More information about the Gcc-patches
mailing list