aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/initializer-address-subtract.c2
-rw-r--r--test/initializer-address-subtract.qbe2
2 files changed, 4 insertions, 0 deletions
diff --git a/test/initializer-address-subtract.c b/test/initializer-address-subtract.c
new file mode 100644
index 0000000..f273d33
--- /dev/null
+++ b/test/initializer-address-subtract.c
@@ -0,0 +1,2 @@
+int a[4];
+int *p = a + 2 - 1;
diff --git a/test/initializer-address-subtract.qbe b/test/initializer-address-subtract.qbe
new file mode 100644
index 0000000..e6aa8cd
--- /dev/null
+++ b/test/initializer-address-subtract.qbe
@@ -0,0 +1,2 @@
+export data $p = align 8 { l $a + 4, }
+export data $a = align 4 { z 16 }