Attached patch OK for master branch? Gcc produced struct sizes match those of MSVC when __ms_struct__ is used, both producing a layout size of 12.

Will push soon if there are no objections.
From 522b0aa6473e109becc45e57255f14e23fc6a404 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10wa...@gmail.com>
Date: Wed, 9 Apr 2025 14:29:39 +0000
Subject: [PATCH] bf-ms-attrib.c: Fix expected struct size

Both gcc and msvc agree that the struct size should
be 12, gcc is already correct.

Signed-off-by: Jonathan Yong <10wa...@gmail.com>

gcc/testsuite/ChangeLog:

	PR target/113633
        * gcc.dg/bf-ms-attrib.c: Fix expected __ms_struct__ layout
	size.
---
 gcc/testsuite/gcc.dg/bf-ms-attrib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/bf-ms-attrib.c b/gcc/testsuite/gcc.dg/bf-ms-attrib.c
index 2da4f0320d6..5208c7f882f 100644
--- a/gcc/testsuite/gcc.dg/bf-ms-attrib.c
+++ b/gcc/testsuite/gcc.dg/bf-ms-attrib.c
@@ -32,7 +32,7 @@ main()
     /* As long as the sizes are as expected, we know attributes are working.
        bf-ms-layout.c makes sure the right thing happens when the attribute
        is on. */
-    if (sizeof(struct one_ms) != 8)
+    if (sizeof(struct one_ms) != 12)
 	abort();
     if (sizeof(struct one_gcc) != 8)
 	abort();
-- 
2.49.0

Reply via email to