public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] d: Align methods to MINIMUM_METHOD_BOUNDARY.
@ 2021-12-10  1:16 Iain Buclaw
  0 siblings, 0 replies; only message in thread
From: Iain Buclaw @ 2021-12-10  1:16 UTC (permalink / raw)
  To: gcc-patches

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-10  1:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10  1:16 [committed] d: Align methods to MINIMUM_METHOD_BOUNDARY Iain Buclaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).