aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-02-14 01:39:33 -0800
committerMichael Forney <mforney@mforney.org>2019-02-14 01:39:33 -0800
commitf96bd3efcb284f5baf2d637240c9cd2ac07ca672 (patch)
tree039de58ba32e4a953e60906f64d4be5f91e5ae4f /tests
parent22338bdfd0346e85a0e88ca5470302a4775e9054 (diff)
Handle compound literals in global initializers
Diffstat (limited to 'tests')
-rw-r--r--tests/compound-literal-static.c1
-rw-r--r--tests/compound-literal-static.qbe2
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/compound-literal-static.c b/tests/compound-literal-static.c
new file mode 100644
index 0000000..1b1afc9
--- /dev/null
+++ b/tests/compound-literal-static.c
@@ -0,0 +1 @@
+int *x = &(int){2};
diff --git a/tests/compound-literal-static.qbe b/tests/compound-literal-static.qbe
new file mode 100644
index 0000000..c18ec1d
--- /dev/null
+++ b/tests/compound-literal-static.qbe
@@ -0,0 +1,2 @@
+data $.L.1 = align 4 { w 2, }
+export data $x = align 8 { l $.L.1, }