summaryrefslogtreecommitdiff
path: root/test/CodeGen/ms_struct-bitfield-3.c
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-05-06 21:56:12 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-05-06 21:56:12 +0000
commit52bbe7a1133c3cb57e9246f1b96c12940ea3821a (patch)
tree26affd63a6b501df835feef1e65c95274cc2b040 /test/CodeGen/ms_struct-bitfield-3.c
parent31d375f056447d4e2418275d4913661d3bfedb3e (diff)
downloadclang-52bbe7a1133c3cb57e9246f1b96c12940ea3821a.tar.gz
Establish a new alignment for an ms_struct bitfield following
a non-bitfield if size of their types differ. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ms_struct-bitfield-3.c')
-rw-r--r--test/CodeGen/ms_struct-bitfield-3.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/CodeGen/ms_struct-bitfield-3.c b/test/CodeGen/ms_struct-bitfield-3.c
new file mode 100644
index 0000000000..96782980dc
--- /dev/null
+++ b/test/CodeGen/ms_struct-bitfield-3.c
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-apple-darwin9 %s
+// rdar://8823265
+
+#define ATTR __attribute__((__ms_struct__))
+
+struct _struct_0
+{
+ int member_0 : 25 ;
+ short member_1 : 6 ;
+ char member_2 : 2 ;
+ unsigned short member_3 : 1 ;
+ unsigned char member_4 : 7 ;
+ short member_5 : 16 ;
+ int : 0 ;
+ char member_7 ;
+
+} ATTR;
+
+typedef struct _struct_0 struct_0;
+
+#define size_struct_0 20
+
+struct_0 test_struct_0 = { 18557917, 17, 3, 0, 80, 6487, 93 };
+static int a[(size_struct_0 == sizeof (struct_0)) -1];