diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-18 18:28:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-18 18:28:57 +0000 |
commit | 28bcf1a4298e581fd003b5361cbd1de25fbe44f5 (patch) | |
tree | 91669ec66f8f0ecae1f5f7669db9e33e75dca0b4 /clang/test/CodeGen/exprs.c | |
parent | d175d9753b75d53a0cf34307c3ac23cd9c5dedc6 (diff) | |
download | bcm5719-llvm-28bcf1a4298e581fd003b5361cbd1de25fbe44f5.tar.gz bcm5719-llvm-28bcf1a4298e581fd003b5361cbd1de25fbe44f5.zip |
add codegen support for casting an element to a union.
There are some more complex cases (_Complex and structs)
that I'm still working on.
llvm-svn: 67218
Diffstat (limited to 'clang/test/CodeGen/exprs.c')
-rw-r--r-- | clang/test/CodeGen/exprs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/CodeGen/exprs.c b/clang/test/CodeGen/exprs.c index c22a4ecc71d..a0fe9600895 100644 --- a/clang/test/CodeGen/exprs.c +++ b/clang/test/CodeGen/exprs.c @@ -79,3 +79,6 @@ unsigned f1(void) { return (unsigned) fp; } +union f3_x {int x; float y;}; +int f3() {return ((union f3_x)2).x;} + |