Fix IRgen of constant expressions referring to external/static
variables.
- PR3657.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65381 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c
index 0ca7c24..65a59e8 100644
--- a/test/CodeGen/const-init.c
+++ b/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