From 673ddb9e58883da5a8840fa7f5b16a439b3f5dd7 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Wed, 20 Feb 2019 18:20:40 -0800 Subject: Fix emittype for unions Thanks to Andrew Chambers for the bug report. --- tests/union-passing.c | 2 ++ tests/union-passing.qbe | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 tests/union-passing.c create mode 100644 tests/union-passing.qbe (limited to 'tests') diff --git a/tests/union-passing.c b/tests/union-passing.c new file mode 100644 index 0000000..14025c0 --- /dev/null +++ b/tests/union-passing.c @@ -0,0 +1,2 @@ +void f(union {int x;} u) { +} diff --git a/tests/union-passing.qbe b/tests/union-passing.qbe new file mode 100644 index 0000000..96e8523 --- /dev/null +++ b/tests/union-passing.qbe @@ -0,0 +1,7 @@ +type :.1 = { w, } +export +function $f(:.1 %.1) { +@start.1 +@body.2 + ret +} -- cgit v1.2.3