aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-02-20 14:06:45 -0800
committerMichael Forney <mforney@mforney.org>2019-02-20 14:06:45 -0800
commit9150901e4ebde2273bf266d608a7a05228e1d0df (patch)
tree69bd840a4ac9400cac3c6d1b1525ce81baccea70 /tests
parent1d47a3f01bd5ea43ce798fa6624b65dfdc6a37c0 (diff)
downloadcproc-9150901e4ebde2273bf266d608a7a05228e1d0df.tar.xz
eval: Handle nested offset address constants
Diffstat (limited to 'tests')
-rw-r--r--tests/initializer-nested-array-address.c2
-rw-r--r--tests/initializer-nested-array-address.qbe2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/initializer-nested-array-address.c b/tests/initializer-nested-array-address.c
new file mode 100644
index 0000000..fb8bbd5
--- /dev/null
+++ b/tests/initializer-nested-array-address.c
@@ -0,0 +1,2 @@
+int x[2][3];
+int *y = &x[1][2];
diff --git a/tests/initializer-nested-array-address.qbe b/tests/initializer-nested-array-address.qbe
new file mode 100644
index 0000000..5379590
--- /dev/null
+++ b/tests/initializer-nested-array-address.qbe
@@ -0,0 +1,2 @@
+export data $y = align 8 { l $x + 20, }
+export data $x = align 4 { z 24 }