aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/C++Frontend/2005-01-03-StaticInitializers.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/C++Frontend/2005-01-03-StaticInitializers.cpp b/test/C++Frontend/2005-01-03-StaticInitializers.cpp
new file mode 100644
index 0000000000..b215d3e3da
--- /dev/null
+++ b/test/C++Frontend/2005-01-03-StaticInitializers.cpp
@@ -0,0 +1,8 @@
+// RUN: %llvmgxx %s -S -o - | grep '%XX = global int 4'
+
+struct S {
+ int A[2];
+};
+
+int XX = (int)&(((struct S*)0)->A[1]);
+