summaryrefslogtreecommitdiff
path: root/test/lit/validation
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/validation')
-rw-r--r--test/lit/validation/shared-absheaptype.wast11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lit/validation/shared-absheaptype.wast b/test/lit/validation/shared-absheaptype.wast
new file mode 100644
index 000000000..6ab3c0219
--- /dev/null
+++ b/test/lit/validation/shared-absheaptype.wast
@@ -0,0 +1,11 @@
+;; 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: (import "" "" (global $gimport$0 (ref null (shared any))))
+
+(module
+ (global (import "" "") (ref null (shared any)))
+)