| ;; 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 $e-i32 (param i32)) | |
| ;; CHECK: [fuzz-exec] export throw | |
| ;; CHECK-NEXT: [exception thrown: e-i32 1] | |
| (func $throw (export "throw") | |
| (throw $e-i32 (i32.const 1)) | |
| ) | |
| ;; CHECK: [fuzz-exec] export try_table-catch | |
| (func $try_table-catch (export "try_table-catch") | |
| (block $tryend | |
| (drop | |
| (block $catch (result i32) | |
| (try_table (catch $e-i32 $catch) | |
| (throw $e-i32 (i32.const 2)) | |
| ) | |
| (br $tryend) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ;; CHECK: [fuzz-exec] export catchless-try_table | |
| ;; CHECK-NEXT: [exception thrown: e-i32 3] | |
| (func $catchless-try_table (export "catchless-try_table") | |
| (try_table | |
| (throw $e-i32 (i32.const 3)) | |
| ) | |
| ) | |
| ) | |
| ;; CHECK: [fuzz-exec] export throw | |
| ;; CHECK-NEXT: [exception thrown: e-i32 1] | |
| ;; CHECK: [fuzz-exec] export try_table-catch | |
| ;; CHECK: [fuzz-exec] export catchless-try_table | |
| ;; CHECK-NEXT: [exception thrown: e-i32 3] | |
| ;; CHECK-NEXT: [fuzz-exec] comparing catchless-try_table | |
| ;; CHECK-NEXT: [fuzz-exec] comparing throw | |
| ;; CHECK-NEXT: [fuzz-exec] comparing try_table-catch |