implement constant expr. sub ptr ptr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52049 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/struct-init.c b/test/CodeGen/struct-init.c
new file mode 100644
index 0000000..5b815de
--- /dev/null
+++ b/test/CodeGen/struct-init.c
@@ -0,0 +1,13 @@
+// RUN: clang %s -emit-llvm
+
+typedef struct _zend_ini_entry zend_ini_entry;
+struct _zend_ini_entry {
+ void *mh_arg1;
+};
+
+char a;
+
+const zend_ini_entry ini_entries[] = {
+ { ((char*)&((zend_ini_entry*)0)->mh_arg1 - (char*)(void*)0)},
+ { ((long long*)&a - (long long*)(void*)2)},
+};