commit | abad06cfd01edbd6ffe80856304b5ad991b67d08 | [log] [tgz] |
---|---|---|
author | Devang Patel <dpatel@apple.com> | Fri Oct 26 19:42:18 2007 +0000 |
committer | Devang Patel <dpatel@apple.com> | Fri Oct 26 19:42:18 2007 +0000 |
tree | 7e5d788c1c3611ebeae6b53eeb7452f3b684b7ef | |
parent | 0a96118bb8cec6224aef53f001a0a4f87a7be8fb [diff] |
Codegen union member references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43390 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/union.c b/test/CodeGen/union.c new file mode 100644 index 0000000..8102f9b --- /dev/null +++ b/test/CodeGen/union.c
@@ -0,0 +1,18 @@ +// RUN: clang %s -emit-llvm + +union { + int a; + float b; +} u; + +void f() { + u.b = 11; +} + +int f2( float __x ) { + union{ + float __f; + unsigned int __u; + }__u; + return (int)(__u.__u >> 31); +}