aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/2008-02-07-bitfield-bug.c
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@gmail.com>2008-02-07 18:18:58 +0000
committerLauro Ramos Venancio <lauro.venancio@gmail.com>2008-02-07 18:18:58 +0000
commit8432f4b4cdd1707f7f5dc06f35b4597dca252f2c (patch)
treee9394b4697922ea6e1d116c8a2c8256fa303d76d /test/CodeGen/2008-02-07-bitfield-bug.c
parent61900f0ef4fc705e62609939f30a375a9576e43d (diff)
Fix codegen of
struct { char a[3]; unsigned char b:1; }; Fix PR1990. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46856 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/2008-02-07-bitfield-bug.c')
-rw-r--r--test/CodeGen/2008-02-07-bitfield-bug.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/2008-02-07-bitfield-bug.c b/test/CodeGen/2008-02-07-bitfield-bug.c
new file mode 100644
index 0000000000..996cc4c56a
--- /dev/null
+++ b/test/CodeGen/2008-02-07-bitfield-bug.c
@@ -0,0 +1,11 @@
+// RUN: clang %s -emit-llvm
+// PR1990
+
+struct test {
+ char a[3];
+ unsigned char b:1;
+};
+
+void f(struct test *t) {
+ t->b = 1;
+}