fix PR3459: improve compatibility with gcc when checking for constant exprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63517 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/struct-decl.c b/test/Sema/struct-decl.c
new file mode 100644
index 0000000..cacd847
--- /dev/null
+++ b/test/Sema/struct-decl.c
@@ -0,0 +1,10 @@
+// RUN: clang -fsyntax-only -verify %s
+
+// PR3459
+struct bar {
+	char n[1];
+};
+
+struct foo {
+	char name[(int)&((struct bar *)0)->n];
+};