Also, revert a couple of suppressions.
r214298, "Suppress clang/test/Sema/struct-packed-align.c for targeting LLP64."
r214301, "Suppress clang/test/Sema/struct-packed-align.c also on msvc for investigating."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214794
91177308-0d34-0410-b5e6-
96231b3b80d8
// RUN: %clang_cc1 %s -fsyntax-only -verify
// expected-no-diagnostics
-// FIXME: This test is incompatible to MS compat mode.
-// REQUIRES: shell
-
// Packed structs.
struct s {
char a;
extern int m2[__alignof(struct packed_fas2) == 1 ? 1 : -1];
// Attribute aligned can round down typedefs. PR9253
-// REQUIRES: LP64
typedef long long __attribute__((aligned(1))) nt;
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