summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/vacuum_all-features.txt3
-rw-r--r--test/passes/vacuum_all-features.wast15
2 files changed, 18 insertions, 0 deletions
diff --git a/test/passes/vacuum_all-features.txt b/test/passes/vacuum_all-features.txt
index 91a8a8edb..d563d70ed 100644
--- a/test/passes/vacuum_all-features.txt
+++ b/test/passes/vacuum_all-features.txt
@@ -463,4 +463,7 @@
)
)
)
+ (func $br-in-catch
+ (unreachable)
+ )
)
diff --git a/test/passes/vacuum_all-features.wast b/test/passes/vacuum_all-features.wast
index 98f13dd69..35d6fbd30 100644
--- a/test/passes/vacuum_all-features.wast
+++ b/test/passes/vacuum_all-features.wast
@@ -824,4 +824,19 @@
)
)
)
+
+ ;; When catch body is removed, the removal of 'br' inside the catch body
+ ;; should be propagated up to the outer block, so that its type will be
+ ;; correctly updated to unreachable.
+ (func $br-in-catch
+ (block $label$1
+ (try
+ (unreachable)
+ (catch
+ (drop (exnref.pop))
+ (br $label$1)
+ )
+ )
+ )
+ )
)