Be a bit stricter about array type compatibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46799 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/compare.c b/test/Sema/compare.c
index 25d7a91..e1ebf57 100644
--- a/test/Sema/compare.c
+++ b/test/Sema/compare.c
@@ -1,4 +1,4 @@
-// RUN: clang -fsyntax-only -verify %s
+// RUN: clang -fsyntax-only -pedantic -verify %s
 
 int test(char *C) { // nothing here should warn.
   return C != ((void*)0);
@@ -10,3 +10,8 @@
 {
     return a == b;
 }
+
+int arrays(char (*a)[5], char(*b)[10], char(*c)[5]) {
+  int d = (a == c);
+  return a == b; // expected-warning {{comparison of distinct pointer types}}
+}