summaryrefslogtreecommitdiff
path: root/test/lit/validation/eqref.wast
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-05-18 14:22:16 -0700
committerGitHub <noreply@github.com>2022-05-18 14:22:16 -0700
commit5e613af62b466cb8a9a235a4ea64ace2e003aaa8 (patch)
tree91f00ab77ec91bc1defe05264afb7d6277f9d616 /test/lit/validation/eqref.wast
parent12f59507ee65b29ce08f37089594f752f846af9d (diff)
downloadbinaryen-5e613af62b466cb8a9a235a4ea64ace2e003aaa8.tar.gz
binaryen-5e613af62b466cb8a9a235a4ea64ace2e003aaa8.tar.bz2
binaryen-5e613af62b466cb8a9a235a4ea64ace2e003aaa8.zip
Validator: Check features for ref.null's type (#4677)
Diffstat (limited to 'test/lit/validation/eqref.wast')
-rw-r--r--test/lit/validation/eqref.wast19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/lit/validation/eqref.wast b/test/lit/validation/eqref.wast
new file mode 100644
index 000000000..78b6e75d2
--- /dev/null
+++ b/test/lit/validation/eqref.wast
@@ -0,0 +1,19 @@
+;; Test for eqref validating only with GC, and not just reference types, even
+;; when only declared in a null.
+
+;; RUN: not wasm-opt --enable-reference-types %s 2>&1 | filecheck %s --check-prefix NO-GC
+;; RUN: wasm-opt --enable-reference-types --enable-gc %s -o - -S | filecheck %s --check-prefix GC
+
+;; NO-GC: ref.null type should be allowed
+
+;; GC: (drop
+;; GC: (ref.null eq)
+;; GC: )
+
+(module
+ (func $foo
+ (drop
+ (ref.null eq)
+ )
+ )
+)