summaryrefslogtreecommitdiff
path: root/test/lit/passes/asyncify_verbost.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/passes/asyncify_verbost.wast')
-rw-r--r--test/lit/passes/asyncify_verbost.wast37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/lit/passes/asyncify_verbost.wast b/test/lit/passes/asyncify_verbost.wast
new file mode 100644
index 000000000..3bc4901b0
--- /dev/null
+++ b/test/lit/passes/asyncify_verbost.wast
@@ -0,0 +1,37 @@
+;; RUN: foreach %s %t wasm-opt --asyncify --pass-arg=asyncify-verbose -q | filecheck %s
+
+;; The import is reported as changing the state, as all imports can.
+;;
+;; CHECK: [asyncify] import is an import that can change the state
+
+;; The function that calls the import can change the state too.
+;;
+;; CHECK: [asyncify] calls-import can change the state due to import
+
+;; Likewise, further up the call chain as well.
+;;
+;; CHECK: [asyncify] calls-calls-import can change the state due to calls-import
+;; CHECK: [asyncify] calls-calls-calls-import can change the state due to calls-calls-import
+
+(module
+ (import "env" "import" (func $import))
+
+ (memory 1 2)
+
+ (func $calls-import
+ (call $import)
+ )
+
+ (func $calls-calls-import
+ (call $calls-import)
+ )
+
+ (func $calls-calls-calls-import
+ (call $calls-calls-import)
+ )
+
+ (func $nothing
+ (nop)
+ )
+)
+