summaryrefslogtreecommitdiff
path: root/test/lit/validation/ref-func-simd.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/validation/ref-func-simd.wast')
-rw-r--r--test/lit/validation/ref-func-simd.wast13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lit/validation/ref-func-simd.wast b/test/lit/validation/ref-func-simd.wast
new file mode 100644
index 000000000..78f2ed99e
--- /dev/null
+++ b/test/lit/validation/ref-func-simd.wast
@@ -0,0 +1,13 @@
+;; A function type that uses a SIMD type requires the SIMD feature.
+;; RUN: not wasm-opt --enable-reference-types %s 2>&1 | filecheck %s
+
+;; CHECK: all used types should be allowed
+
+(module
+ (type $simd-user (func (param v128)))
+
+ (global $g (ref null $simd-user) (ref.null func))
+)
+
+;; But it passes with the feature enabled.
+;; RUN: wasm-opt --enable-reference-types --enable-simd %s