summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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)
+ )
+ )
+)