diff options
author | Devang Patel <dpatel@apple.com> | 2007-10-26 19:42:18 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-10-26 19:42:18 +0000 |
commit | abad06cfd01edbd6ffe80856304b5ad991b67d08 (patch) | |
tree | 7e5d788c1c3611ebeae6b53eeb7452f3b684b7ef /test/CodeGen/union.c | |
parent | 0a96118bb8cec6224aef53f001a0a4f87a7be8fb (diff) |
Codegen union member references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/union.c')
-rw-r--r-- | test/CodeGen/union.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/union.c b/test/CodeGen/union.c new file mode 100644 index 0000000000..8102f9b6fd --- /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); +} |