From f1d81e337c4cfabcdb38e964d623cd768c02c7b5 Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Tue, 18 Mar 2025 03:22:49 -0700 Subject: [PATCH] [dart2wasm] Ensure tests/web/wasm/issue_56234_test runs in unoptimized mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test is a regression test for a dart2wasm compiler crash. It tests that the compiler doesn't crash anymore but the error happens at runtime. The particular error that will happen at runtime is that `unreachable` will be hit (in the place where a unboxed double is attempted to be cast to an unboxed integer). Since we run binaryen with `--traps-never-happen` it may optimize this `unreachable` away and make the test accidentally pass. So we force this to be run in `-O0` mode, which means we don't run binaryen on it. Change-Id: I6460982d4b32d773ee763e9687c8fec0bffa00f0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415881 Reviewed-by: Ömer Ağacan Commit-Queue: Martin Kustermann --- tests/web/wasm/issue_56234_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/web/wasm/issue_56234_test.dart b/tests/web/wasm/issue_56234_test.dart index 4ae787274ac..a6845358241 100644 --- a/tests/web/wasm/issue_56234_test.dart +++ b/tests/web/wasm/issue_56234_test.dart @@ -5,7 +5,7 @@ // Formatting can break multitests, so don't format them. // dart format off -// dart2wasmOptions=--extra-compiler-option=--omit-explicit-checks +// dart2wasmOptions=-O0 --extra-compiler-option=--omit-explicit-checks class C { final double x;