| 1 |
;; RUN: wast --assert default --snapshot tests/snapshots % |
| 2 |
|
| 3 |
;; --enable-gc |
| 4 |
|
| 5 |
(module |
| 6 |
(type $a (struct)) |
| 7 |
(type $b (struct)) |
| 8 |
|
| 9 |
(type $f1 (func (param (ref $a)))) |
| 10 |
(type $f2 (func (result (ref $b)))) |
| 11 |
|
| 12 |
(global (ref null $a) (ref.null $a)) |
| 13 |
(global (ref null $b) (ref.null $b)) |
| 14 |
|
| 15 |
(func (param (ref $a))) |
| 16 |
(func (param (ref 0))) |
| 17 |
(func (type $f1) (param (ref 0))) |
| 18 |
(func (type $f1) (param (ref $a))) |
| 19 |
(func (result (ref $a)) unreachable) |
| 20 |
(func (local (ref $a))) |
| 21 |
|
| 22 |
(func |
| 23 |
(select (result (ref $a)) unreachable unreachable (i32.const 0)) |
| 24 |
|
| 25 |
(block (param (ref $a)) unreachable) |
| 26 |
(block (result (ref $b)) unreachable) |
| 27 |
(block $f1 (param (ref $a)) unreachable) |
| 28 |
(block $f2 (result (ref $b)) unreachable) |
| 29 |
|
| 30 |
(loop (param (ref $a)) unreachable) |
| 31 |
(loop (result (ref $b)) unreachable) |
| 32 |
(loop $f1 (param (ref $a)) unreachable) |
| 33 |
(loop $f2 (result (ref $b)) unreachable) |
| 34 |
drop |
| 35 |
|
| 36 |
(if (param (ref $a)) (then unreachable) (else unreachable)) |
| 37 |
(if (result (ref $b)) (then unreachable) (else unreachable)) |
| 38 |
drop |
| 39 |
(if $f1 (param (ref $a)) (then unreachable) (else unreachable)) |
| 40 |
(if $f2 (result (ref $b)) (then unreachable) (else unreachable)) |
| 41 |
drop |
| 42 |
) |
| 43 |
) |