summaryrefslogtreecommitdiff
path: root/test/c/nested_fields.sail
diff options
context:
space:
mode:
authorjp2020-02-12 17:46:48 +0000
committerjp2020-02-12 17:46:48 +0000
commited8bccd927306551f93d5aab8d0e2a92b9e5d227 (patch)
tree55bf788c8155f0c7d024f2147f5eb3873729b02a /test/c/nested_fields.sail
parent31a65c9b7383d2a87da0fbcf5c265d533146ac23 (diff)
parent4a72cb8084237161d0bccc66f27d5fb6d24315e0 (diff)
Merge branch 'sail2' of https://github.com/rems-project/sail into sail2
Diffstat (limited to 'test/c/nested_fields.sail')
-rw-r--r--test/c/nested_fields.sail20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/c/nested_fields.sail b/test/c/nested_fields.sail
new file mode 100644
index 00000000..1e26dac9
--- /dev/null
+++ b/test/c/nested_fields.sail
@@ -0,0 +1,20 @@
+default Order dec
+
+$include <prelude.sail>
+
+struct B = {
+ f3: int,
+ f4: int,
+}
+
+struct A = {
+ f1: B,
+ f2: int,
+}
+
+register R : A
+
+function main() -> unit = {
+ R.f1.f3 = 2;
+ print_int("", R.f1.f3)
+} \ No newline at end of file