summaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test84.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/romcc/tests/simple_test84.c')
-rw-r--r--util/romcc/tests/simple_test84.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/util/romcc/tests/simple_test84.c b/util/romcc/tests/simple_test84.c
new file mode 100644
index 0000000000..bc98bf3419
--- /dev/null
+++ b/util/romcc/tests/simple_test84.c
@@ -0,0 +1,28 @@
+struct stuff {
+ signed int a : 5;
+ signed int b : 6;
+ signed int c : 2;
+ unsigned int d : 3;
+};
+
+static void main(void)
+{
+ struct stuff var;
+ volatile int a, b, c, d;
+ a = 1;
+ b = 2;
+ c = 3;
+ d = 7;
+
+ var.a = a;
+ var.b = b;
+ var.c = c;
+ var.d = d;
+
+ a = var.a;
+ b = var.b;
+ c = var.c;
+ d = var.d;
+
+ asm(" " :: "r"(a), "r"(b), "r"(c), "r"(d));
+}