summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/dce_all-features.txt6
-rw-r--r--test/passes/dce_all-features.wast15
2 files changed, 21 insertions, 0 deletions
diff --git a/test/passes/dce_all-features.txt b/test/passes/dce_all-features.txt
index bc1e24951..779405c13 100644
--- a/test/passes/dce_all-features.txt
+++ b/test/passes/dce_all-features.txt
@@ -591,3 +591,9 @@
)
)
)
+(module
+ (type $none_=>_ref|any| (func (result (ref any))))
+ (func $foo (result (ref any))
+ (unreachable)
+ )
+)
diff --git a/test/passes/dce_all-features.wast b/test/passes/dce_all-features.wast
index 0f0416f66..95344be93 100644
--- a/test/passes/dce_all-features.wast
+++ b/test/passes/dce_all-features.wast
@@ -792,3 +792,18 @@
)
)
)
+(module
+ (func $foo (result (ref any))
+ (block $label$1 (result (ref any))
+ ;; this break has an unreachable input, and so it does not have a heap type
+ ;; there, and no heap type to send on the branch. this tests we do not hit
+ ;; the assertion in getHeapType() if we call that.
+ (br_on_non_null $label$1
+ (block (result anyref)
+ (unreachable)
+ )
+ )
+ (unreachable)
+ )
+ )
+)