diff options
Diffstat (limited to 'clang/test/CodeGen/union.c')
-rw-r--r-- | clang/test/CodeGen/union.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CodeGen/union.c b/clang/test/CodeGen/union.c new file mode 100644 index 00000000000..8102f9b6fd7 --- /dev/null +++ b/clang/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); +} |