Don't crash emitting an initializer for a static local with union type.  
This fix just makes sure to construct the global with the appropriate 
type, and fixes up the one user this affects to compensate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52084 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/static-local-union.c b/test/CodeGen/static-local-union.c
new file mode 100644
index 0000000..9515a31
--- /dev/null
+++ b/test/CodeGen/static-local-union.c
@@ -0,0 +1,4 @@
+// RUN: clang -emit-llvm < %s
+
+int a() {static union{int a;} r[2] = {1,2};return r[1].a;}
+