diff options
author | Anders Carlsson <andersca@mac.com> | 2010-04-17 20:21:41 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-04-17 20:21:41 +0000 |
commit | de9f153b2348f590151504888c22cb937134cd27 (patch) | |
tree | 2c03564952cd17de4799f62f6b30164b601d4ba4 /test/CodeGenCXX/bitfield-layout.cpp | |
parent | eb5d7b752651283de5abfcc2f91df7227582a08d (diff) |
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
Diffstat (limited to 'test/CodeGenCXX/bitfield-layout.cpp')
-rw-r--r-- | test/CodeGenCXX/bitfield-layout.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenCXX/bitfield-layout.cpp b/test/CodeGenCXX/bitfield-layout.cpp new file mode 100644 index 0000000000..c77c925d87 --- /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; |