diff options
Diffstat (limited to 'clang/test/CodeGen/2007-05-15-PaddingElement.c')
-rw-r--r-- | clang/test/CodeGen/2007-05-15-PaddingElement.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/CodeGen/2007-05-15-PaddingElement.c b/clang/test/CodeGen/2007-05-15-PaddingElement.c new file mode 100644 index 0000000..5aa4f2e --- /dev/null +++ b/clang/test/CodeGen/2007-05-15-PaddingElement.c @@ -0,0 +1,23 @@ +// PR 1419 + +// RUN: %clang_cc1 -O2 %s -emit-llvm -o - | grep "ret i32 1" +struct A { + short x; + long long :0; +}; + +struct B { + char a; + char b; + unsigned char i; +}; + +union X { struct A a; struct B b; }; + +int check(void) { + union X x, y; + + y.b.i = 0xff; + x = y; + return (x.b.i == 0xff); +} |