diff options
Diffstat (limited to 'test/lit/validation/shared-struct.wast')
-rw-r--r-- | test/lit/validation/shared-struct.wast | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lit/validation/shared-struct.wast b/test/lit/validation/shared-struct.wast new file mode 100644 index 000000000..ee25b6f24 --- /dev/null +++ b/test/lit/validation/shared-struct.wast @@ -0,0 +1,12 @@ +;; Test that shared structs require shared-everything threads + +;; RUN: not wasm-opt %s 2>&1 | filecheck %s --check-prefix NO-SHARED +;; RUN: wasm-opt %s --enable-reference-types --enable-gc --enable-shared-everything -o - -S | filecheck %s --check-prefix SHARED + +;; NO-SHARED: global type requires additional features [--enable-reference-types --enable-gc --enable-shared-everything] +;; SHARED: (type $t (shared (struct ))) + +(module + (type $t (shared (struct))) + (global (import "" "") (ref null $t)) +) |