summaryrefslogtreecommitdiff
path: root/test/lit/exec
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/exec')
-rw-r--r--test/lit/exec/eh-gc.wast28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/lit/exec/eh-gc.wast b/test/lit/exec/eh-gc.wast
new file mode 100644
index 000000000..cac2f6adf
--- /dev/null
+++ b/test/lit/exec/eh-gc.wast
@@ -0,0 +1,28 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.
+
+;; RUN: wasm-opt %s -all --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s
+
+(module
+ (tag $tag (param externref))
+
+ ;; CHECK: [fuzz-exec] calling catch-null
+ (func "catch-null"
+ (try $label$3
+ (do
+ ;; Throw a null.
+ (throw $tag
+ (ref.null noextern)
+ )
+ )
+ (catch $tag
+ ;; The popped type here is more refined than external (it is a bottom type)
+ ;; which we should not error on.
+ (drop
+ (pop externref)
+ )
+ )
+ )
+ )
+)
+;; CHECK: [fuzz-exec] calling catch-null
+;; CHECK-NEXT: [fuzz-exec] comparing catch-null