summaryrefslogtreecommitdiff
path: root/test/unreachable-code.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/unreachable-code.wast')
-rw-r--r--test/unreachable-code.wast85
1 files changed, 85 insertions, 0 deletions
diff --git a/test/unreachable-code.wast b/test/unreachable-code.wast
new file mode 100644
index 000000000..f67d10e52
--- /dev/null
+++ b/test/unreachable-code.wast
@@ -0,0 +1,85 @@
+(module
+ (func $a
+ (if (i32.const 1)
+ (unreachable)
+ )
+ )
+ (func $b
+ (if (i32.const 1)
+ (unreachable)
+ (unreachable)
+ )
+ )
+ (func $a-block
+ (block
+ (if (i32.const 1)
+ (unreachable)
+ )
+ )
+ )
+ (func $b-block
+ (block
+ (if (i32.const 1)
+ (unreachable)
+ (unreachable)
+ )
+ )
+ )
+ (func $a-prepost
+ (nop)
+ (if (i32.const 1)
+ (unreachable)
+ )
+ (nop)
+ )
+ (func $b-prepost
+ (nop)
+ (if (i32.const 1)
+ (unreachable)
+ (unreachable)
+ )
+ (nop)
+ )
+ (func $a-block-prepost
+ (nop)
+ (block
+ (if (i32.const 1)
+ (unreachable)
+ )
+ )
+ (nop)
+ )
+ (func $b-block-prepost
+ (nop)
+ (block
+ (if (i32.const 1)
+ (unreachable)
+ (unreachable)
+ )
+ )
+ (nop)
+ )
+ (func $recurse
+ (block $a
+ (nop)
+ (block $b
+ (nop)
+ (br $b)
+ (nop)
+ )
+ (nop)
+ )
+ )
+ (func $recurse-b
+ (block $a
+ (nop)
+ (block $b
+ (nop)
+ (br $a)
+ (nop)
+ )
+ (nop)
+ )
+ )
+)
+