summaryrefslogtreecommitdiff
path: root/test/lit/validation/function-missing.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/validation/function-missing.wast')
-rw-r--r--test/lit/validation/function-missing.wast14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lit/validation/function-missing.wast b/test/lit/validation/function-missing.wast
new file mode 100644
index 000000000..5510644a7
--- /dev/null
+++ b/test/lit/validation/function-missing.wast
@@ -0,0 +1,14 @@
+;; Test that we validate functions declaration and usage for globals.
+
+;; RUN: not wasm-opt %s -all 2>&1 | filecheck %s
+
+(module
+ ;; CHECK: function not defined
+ (global (mut i32) (block))
+
+ ;; CHECK: function not defined
+ (global (mut i32) (return_call 0))
+
+ (func $0
+ )
+) \ No newline at end of file