diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/inlining_all-features.txt | 26 | ||||
-rw-r--r-- | test/passes/inlining_all-features.wast | 21 |
2 files changed, 47 insertions, 0 deletions
diff --git a/test/passes/inlining_all-features.txt b/test/passes/inlining_all-features.txt index e23736fac..e0ecf57b5 100644 --- a/test/passes/inlining_all-features.txt +++ b/test/passes/inlining_all-features.txt @@ -53,3 +53,29 @@ ) ) ) +(module + (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) + (import "a" "b" (func $foo (result i32))) + (event $event$0 (attr 0) (param i32)) + (export "exported" (func $1)) + (func $1 (param $x i32) + (loop $label + (block + (block $__inlined_func$0 + (try $label0 + (do + (nop) + ) + (catch $event$0 + (nop) + ) + ) + ) + ) + (br_if $label + (call $foo) + ) + ) + ) +) diff --git a/test/passes/inlining_all-features.wast b/test/passes/inlining_all-features.wast index 863daad9b..3890d63a1 100644 --- a/test/passes/inlining_all-features.wast +++ b/test/passes/inlining_all-features.wast @@ -43,3 +43,24 @@ (call $0) ) ) +;; properly ensure unique try labels after an inlining +(module + (import "a" "b" (func $foo (result i32))) + (event $event$0 (attr 0) (param i32)) + (func $0 + (try $label + (do) + (catch $event$0 + (nop) + ) + ) + ) + (func "exported" (param $x i32) + (loop $label ;; the same label as the try that will be inlined into here + (call $0) + (br_if $label + (call $foo) + ) + ) + ) +) |