PR4013 and PR4105: pointer-like types can only be cast to/from integers 
and other pointer-like types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70531 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/cast.c b/test/Sema/cast.c
index 6ceec69..ec19626 100644
--- a/test/Sema/cast.c
+++ b/test/Sema/cast.c
@@ -5,4 +5,10 @@
 void foo() {
   (void)x;
 }
+void bar() {
+  char* a;
+  double b;
+  b = (double)a; // expected-error {{pointer cannot be cast to type}}
+  a = (char*)b; // expected-error {{cannot be cast to a pointer type}}
+}