summaryrefslogtreecommitdiff
path: root/test/lit/validation
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-07-16 18:37:13 -0400
committerGitHub <noreply@github.com>2024-07-16 15:37:13 -0700
commitd91f1c4ea8d4d8fc075fc868d6f7c05829003968 (patch)
treefcb402223355664867b730ac3fdc72320243a188 /test/lit/validation
parenta8df0bf7901a78caccdcb6fad96fa3bdb6697ca1 (diff)
downloadbinaryen-d91f1c4ea8d4d8fc075fc868d6f7c05829003968.tar.gz
binaryen-d91f1c4ea8d4d8fc075fc868d6f7c05829003968.tar.bz2
binaryen-d91f1c4ea8d4d8fc075fc868d6f7c05829003968.zip
[threads] Fix feature detection for shared basic heap types (#6756)
The logic for adding the shared-everything feature was not previously executed for shared basic heap types.
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)))
+)