Skip to content

Commit 42fcd67

Browse files
committed
Fold throw_ref too
1 parent 24b6fdb commit 42fcd67

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/roundtrip/fold-unreachable.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
;;; TOOL: run-roundtrip
2-
;;; ARGS: --stdout --fold-exprs
2+
;;; ARGS: --stdout --enable-exceptions --fold-exprs
33
(module
44
(func (result i32)
55
i32.const 1
@@ -26,7 +26,12 @@
2626
(func (result i32)
2727
i32.const 0
2828
return
29-
i32.eqz))
29+
i32.eqz)
30+
31+
(func
32+
ref.null exn
33+
throw_ref
34+
))
3035
(;; STDOUT ;;;
3136
(module
3237
(type (;0;) (func (result i32)))
@@ -50,5 +55,8 @@
5055
(func (;3;) (type 0) (result i32)
5156
(i32.eqz
5257
(return
53-
(i32.const 0)))))
58+
(i32.const 0))))
59+
(func (;4;) (type 1)
60+
(throw_ref
61+
(ref.null exn))))
5462
;;; STDOUT ;;)

0 commit comments

Comments
 (0)