blob: 8e663b9772c9f96d25cf59c43c0d6fa3f0082948 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
;;; TOOL: run-spec-wasm2c
;;; ARGS*: --enable-exceptions
;;; NOTE: ref: issue-2469
(module
(tag $e0)
(func $longjmp-bait (throw $e0))
(func (export "setjmp-bait") (param $return-early i32) (result i32)
(local $value i32)
(try $try
(do
(br_if $try (local.get $return-early))
(local.set $value (i32.const 1))
(call $longjmp-bait)
)
(catch $e0)
)
(local.get $value)
)
)
(assert_return (invoke "setjmp-bait" (i32.const 1)) (i32.const 0))
(assert_return (invoke "setjmp-bait" (i32.const 0)) (i32.const 1))
(;; STDOUT ;;;
2/2 tests passed.
;;; STDOUT ;;)
|