From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGen/2007-05-15-PaddingElement.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 clang/test/CodeGen/2007-05-15-PaddingElement.c (limited to 'clang/test/CodeGen/2007-05-15-PaddingElement.c') 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); +} -- cgit v1.2.3