Fixes a bug in calculation of field offsets of ms_struct
fields by just following what comment says.
// rdar://10513599
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146414 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/pragma-ms_struct.c b/test/Sema/pragma-ms_struct.c
index b2c2684..d76ee8b 100644
--- a/test/Sema/pragma-ms_struct.c
+++ b/test/Sema/pragma-ms_struct.c
@@ -32,3 +32,24 @@
} __attribute__((ms_struct)) t2;
+// rdar://10513599
+#pragma ms_struct on
+
+typedef struct
+{
+void *pv;
+int l;
+} Foo;
+
+typedef struct
+{
+void *pv1;
+Foo foo;
+unsigned short fInited : 1;
+void *pv2;
+} PackOddity;
+
+#pragma ms_struct off
+
+static int arr[sizeof(PackOddity) == 40 ? 1 : -1];
+