diff --git a/test/conc/dune b/test/conc/dune index b605fece9..2c92f0abd 100644 --- a/test/conc/dune +++ b/test/conc/dune @@ -1,2 +1,2 @@ (cram - (deps %{bin:owi} immediately_fail.wat)) + (deps %{bin:owi} global_sharing.wat immediately_fail.wat)) diff --git a/test/conc/global_sharing.t b/test/conc/global_sharing.t new file mode 100644 index 000000000..f02f7ad9d --- /dev/null +++ b/test/conc/global_sharing.t @@ -0,0 +1,2 @@ + $ owi conc global_sharing.wat + OK diff --git a/test/conc/global_sharing.wat b/test/conc/global_sharing.wat new file mode 100644 index 000000000..e00e0baa1 --- /dev/null +++ b/test/conc/global_sharing.wat @@ -0,0 +1,26 @@ +;; Loads symbolic memory in various iterations +(module + (import "symbolic" "i32_symbol" (func $i32 (result i32))) + (import "symbolic" "assert" (func $assert (param i32))) + + (func $test_globals (param i32) + (global.get 0) + (i32.const 2) + (i32.sub) + (global.set 0) + (global.get 0) + (local.get 0) + (i32.eq) + (call $assert)) + + (func $main + (i32.const 40) + (call $test_globals) + (if (i32.eq (call $i32) (i32.const 0)) + (then + (i32.const 38) + (call $test_globals)))) + (memory $0 1) + (global $0 (mut i32) (i32.const 42)) + (export "main" (func $main)) + (start $main))