From f96bd3efcb284f5baf2d637240c9cd2ac07ca672 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Thu, 14 Feb 2019 01:39:33 -0800 Subject: Handle compound literals in global initializers --- tests/compound-literal-static.c | 1 + tests/compound-literal-static.qbe | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 tests/compound-literal-static.c create mode 100644 tests/compound-literal-static.qbe (limited to 'tests') 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, } -- cgit v1.2.3