aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-06-04 00:01:40 -0700
committerMichael Forney <mforney@mforney.org>2019-06-04 00:01:40 -0700
commitf0465801c10359224330c81bcdd857584e07634a (patch)
tree4b75748f16c7ba6a6e803dbb2e491d20c2676204 /test
parent1461f251570cb768122fc7ab2040b1d32366651e (diff)
downloadcproc-f0465801c10359224330c81bcdd857584e07634a.tar.xz
Fix non-adjacent bit-fields
Diffstat (limited to 'test')
-rw-r--r--test/bitfield-non-adjacent.c3
-rw-r--r--test/bitfield-non-adjacent.qbe1
2 files changed, 4 insertions, 0 deletions
diff --git a/test/bitfield-non-adjacent.c b/test/bitfield-non-adjacent.c
new file mode 100644
index 0000000..ea5233b
--- /dev/null
+++ b/test/bitfield-non-adjacent.c
@@ -0,0 +1,3 @@
+struct {
+ int x : 1, y, z : 1;
+} s = {.z = 1};
diff --git a/test/bitfield-non-adjacent.qbe b/test/bitfield-non-adjacent.qbe
new file mode 100644
index 0000000..e216054
--- /dev/null
+++ b/test/bitfield-non-adjacent.qbe
@@ -0,0 +1 @@
+export data $s = align 4 { z 8, b 1, z 3 }