emit diagnostic when casting a ptr to a small int when doing static initialization (addresses Eli's comments I believe)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63562 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/static-init.c b/test/Sema/static-init.c
index a4035e6..b3c8d0f 100644
--- a/test/Sema/static-init.c
+++ b/test/Sema/static-init.c
@@ -16,4 +16,5 @@
 };
 
 union bar u[1];
-struct foo x = {(int) u}; // no-error
+struct foo x = {(long) u}; // no-error
+struct foo y = {(char) u}; // expected-error {{initializer element is not a compile-time constant}}