| Index: test/cctest/wasm/test-run-wasm.cc
|
| diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
|
| index b5a77fcdaecf8737779d9f7befed863d84a2316f..30c619c8cb2b1f43af37f03f59151b6ab11af69c 100644
|
| --- a/test/cctest/wasm/test-run-wasm.cc
|
| +++ b/test/cctest/wasm/test-run-wasm.cc
|
| @@ -2821,3 +2821,15 @@ TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); }
|
|
|
|
|
| TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); }
|
| +
|
| +TEST(Run_WASM_Int32RemS_dead) {
|
| + WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
|
| + BUILD(r, WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)), WASM_ZERO);
|
| + const int32_t kMin = std::numeric_limits<int32_t>::min();
|
| + CHECK_EQ(0, r.Call(133, 100));
|
| + CHECK_EQ(0, r.Call(kMin, -1));
|
| + CHECK_EQ(0, r.Call(0, 1));
|
| + CHECK_TRAP(r.Call(100, 0));
|
| + CHECK_TRAP(r.Call(-1001, 0));
|
| + CHECK_TRAP(r.Call(kMin, 0));
|
| +}
|
|
|