| ;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited. |
| |
| ;; RUN: foreach %s %t wasm-opt -all --fuzz-exec-before -q -o /dev/null 2>&1 | filecheck %s |
| |
| ;; Resume a continuation from the start function. It should execute without |
| ;; error. |
| |
| (module |
| (type $void (func)) |
| (type $void_cont (cont $void)) |
| (type $i32_pair (func (param i32 i32))) |
| |
| (import "fuzzing-support" "call-export" (func $call_export (type $i32_pair) (param i32 i32))) |
| |
| (tag $susp_tag (type $void)) |
| |
| (export "suspend" (func $suspend)) |
| |
| (start $start) |
| |
| ;; CHECK: [fuzz-exec] export suspend |
| (func $suspend (type $void) |
| (nop) |
| ) |
| |
| (func $start (type $void) |
| (drop |
| (block $handler (result (ref $void_cont)) |
| (resume $void_cont (on $susp_tag $handler) |
| (cont.new $void_cont |
| (ref.func $run) |
| ) |
| ) |
| (return) |
| ) |
| ) |
| ) |
| |
| (func $run (type $void) |
| (call $call_export |
| (i32.const 0) |
| (i32.const 0) |
| ) |
| ) |
| ) |
| |