Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1543)

Unified Diff: test/cctest/wasm/test-run-wasm.cc

Issue 1573053003: [wasm] Fix set_local appearing in unreachable code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cc9663974b6b0252c56a24f5db4420dfe7abdb79..c6f529e35a12d5addc0a56b94634ec9b14c4696e 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -1684,6 +1684,15 @@ TEST(Run_Wasm_Block_If_P_assign) {
}
+TEST(Run_Wasm_DanglingAssign) {
+ WasmRunner<int32_t> r(MachineType::Int32());
+ // { return 0; p0 = 0; }
+ BUILD(r,
+ WASM_BLOCK(2, WASM_RETURN(WASM_I8(99)), WASM_SET_LOCAL(0, WASM_ZERO)));
+ CHECK_EQ(99, r.Call(1));
+}
+
+
TEST(Run_Wasm_ExprIf_P) {
WasmRunner<int32_t> r(MachineType::Int32());
// p0 ? 11 : 22;
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698