From bac5b8195dd8bf6cd105559a04bb0e069aaddf97 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 29 Mar 2021 13:25:24 -0700 Subject: Fix reduction of nondefaultable tuples (#3746) There is a makeZeros right below that, which will assert on a nondefaultable type. --- src/tools/wasm-reduce.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/wasm-reduce.cpp') diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 95e315e96..b84fe8e38 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -1085,7 +1085,7 @@ struct Reducer RefNull* n = builder->makeRefNull(curr->type); return tryToReplaceCurrent(n); } - if (curr->type.isTuple()) { + if (curr->type.isTuple() && curr->type.isDefaultable()) { Expression* n = builder->makeConstantExpression(Literal::makeZeros(curr->type)); return tryToReplaceCurrent(n); -- cgit v1.2.3