From 54846ed0a708d57d25ac5eadd618f8137867df66 Mon Sep 17 00:00:00 2001 From: Mathias Baumann Date: Wed, 5 Dec 2018 11:24:55 +0100 Subject: Fix expression simplifier asserting on default values --- libyul/optimiser/SimplificationRules.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libyul/optimiser') diff --git a/libyul/optimiser/SimplificationRules.cpp b/libyul/optimiser/SimplificationRules.cpp index b3190fef..8ed63fa8 100644 --- a/libyul/optimiser/SimplificationRules.cpp +++ b/libyul/optimiser/SimplificationRules.cpp @@ -114,7 +114,8 @@ bool Pattern::matches(Expression const& _expr, map { YulString varName = boost::get(_expr).name; if (_ssaValues.count(varName)) - expr = _ssaValues.at(varName); + if (Expression const* new_expr = _ssaValues.at(varName)) + expr = new_expr; } assertThrow(expr, OptimizerException, ""); -- cgit