Fix IRgen of constant expressions referring to external/static
variables.
 - PR3657.

llvm-svn: 65381
diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c
index 0ca7c24..65a59e8 100644
--- a/clang/test/CodeGen/const-init.c
+++ b/clang/test/CodeGen/const-init.c
@@ -79,4 +79,11 @@
 // RUN: grep '@g17 = global i32\* @g15' %t &&
 int *g17 = (int *) ((long) &g15);
 
+// RUN: grep '@g18.p = internal global \[1 x i32\*\] \[i32\* @g19\]' %t &&
+// FIXME: Should we really accept this in Sema?
+void g18(void) {
+  extern int g19;
+  static int *p[] = { &g19 };
+}
+
 // RUN: true