aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/struct-packed-align.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/struct-packed-align.c')
-rw-r--r--test/Sema/struct-packed-align.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/Sema/struct-packed-align.c b/test/Sema/struct-packed-align.c
index 166d5eb1ff8d..291de6762cd1 100644
--- a/test/Sema/struct-packed-align.c
+++ b/test/Sema/struct-packed-align.c
@@ -127,9 +127,11 @@ struct nS {
nt start_lba;
};
+#if defined(_WIN32) && !defined(__declspec) // _MSC_VER is unavailable in cc1.
+// Alignment doesn't affect packing in MS mode.
+extern int n1[sizeof(struct nS) == 16 ? 1 : -1];
+extern int n2[__alignof(struct nS) == 8 ? 1 : -1];
+#else
extern int n1[sizeof(struct nS) == 9 ? 1 : -1];
extern int n2[__alignof(struct nS) == 1 ? 1 : -1];
-
-
-
-
+#endif