add support for usage of cast to union thing with static vars

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62387 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/cast-to-union.c b/test/CodeGen/cast-to-union.c
index 3f33904..2f10d6c 100644
--- a/test/CodeGen/cast-to-union.c
+++ b/test/CodeGen/cast-to-union.c
@@ -1,10 +1,13 @@
-// RUN: clang -emit-llvm < %s | grep "store i32 351, i32*"
+// RUN: clang -emit-llvm < %s -o %t &&
+// RUN: grep "store i32 351, i32*" %t &&
+// RUN: grep "w = global <{ i32, i8, i8, i8, i8 }> <{ i32 2, i8 0, i8 0, i8 0, i8 0 }>" %t &&
+// RUN: grep "y = global <{ double }> <{ double 7.300000e+01 }>" %t
 
-union u { int i; };
+union u { int i; double d; };
 
 void foo() {
   union u ola = (union u) 351;
 }
 
-// FIXME: not working yet
-// union u w = (union u)2;
+union u w = (union u)2;
+union u y = (union u)73.0;