If a wide bit-field is inside a union its offset should always be 0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101668 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/bitfield-layout.cpp b/test/CodeGenCXX/bitfield-layout.cpp
new file mode 100644
index 0000000..c77c925
--- /dev/null
+++ b/test/CodeGenCXX/bitfield-layout.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+
+// CHECK: = type { i32, [4 x i8] }
+union Test1 {
+ int a;
+ int b: 39;
+};
+
+Test1 t1;