summaryrefslogtreecommitdiff
path: root/test/lit/validation/shared-null.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/validation/shared-null.wast')
-rw-r--r--test/lit/validation/shared-null.wast12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lit/validation/shared-null.wast b/test/lit/validation/shared-null.wast
new file mode 100644
index 000000000..1c34873bb
--- /dev/null
+++ b/test/lit/validation/shared-null.wast
@@ -0,0 +1,12 @@
+;; Test that shared nulls 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: ref.null requires additional features
+;; NO-SHARED: [--enable-reference-types --enable-shared-everything]
+;; SHARED: (ref.null (shared none))
+
+(module
+ (func (drop (ref.null (shared none))))
+)