summaryrefslogtreecommitdiff
path: root/test/lit/validation
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-08-14 15:03:48 -0400
committerGitHub <noreply@github.com>2024-08-14 12:03:48 -0700
commitcde2a52fc6d679d53d1c5b72b081992d53e01c6b (patch)
tree44d8fc7fc4d41d1d991ebcc45d017aa0f3076839 /test/lit/validation
parentbcb83fd68710daf1f5ddd8252d0a0a4557494ca7 (diff)
downloadbinaryen-cde2a52fc6d679d53d1c5b72b081992d53e01c6b.tar.gz
binaryen-cde2a52fc6d679d53d1c5b72b081992d53e01c6b.tar.bz2
binaryen-cde2a52fc6d679d53d1c5b72b081992d53e01c6b.zip
Heap type `none` requires GC (#6840)
Since reference types only introduced function and extern references, all of the types in the `any` hierarchy require GC, including `none`. Fixes #6839.
Diffstat (limited to 'test/lit/validation')
-rw-r--r--test/lit/validation/nullref-no-gc.wast11
-rw-r--r--test/lit/validation/shared-null.wast2
2 files changed, 12 insertions, 1 deletions
diff --git a/test/lit/validation/nullref-no-gc.wast b/test/lit/validation/nullref-no-gc.wast
new file mode 100644
index 000000000..27560b3ff
--- /dev/null
+++ b/test/lit/validation/nullref-no-gc.wast
@@ -0,0 +1,11 @@
+;; Test that nullref without GC is a validation error.
+
+;; RUN: not wasm-opt %s -all --disable-gc 2>&1 | filecheck %s
+
+;; CHECK: all used types should be allowed
+
+(module
+ (func $test
+ (local nullref)
+ )
+)
diff --git a/test/lit/validation/shared-null.wast b/test/lit/validation/shared-null.wast
index 1c34873bb..0e491dd90 100644
--- a/test/lit/validation/shared-null.wast
+++ b/test/lit/validation/shared-null.wast
@@ -4,7 +4,7 @@
;; 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]
+;; NO-SHARED: [--enable-reference-types --enable-gc --enable-shared-everything]
;; SHARED: (ref.null (shared none))
(module