diff options
Diffstat (limited to 'util/romcc/tests/simple_test84.c')
-rw-r--r-- | util/romcc/tests/simple_test84.c | 28 |
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)); +} |