diff options
author | chriseth <chris@ethereum.org> | 2018-12-06 00:58:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 00:58:23 +0800 |
commit | 32c9da9419499bf839f239ef3e1a8df627218ade (patch) | |
tree | fdba939956682345bf0ef66164e701b37944109d /libyul | |
parent | 63d67c715326209ba1dc2c3800db90830d2c4e13 (diff) | |
parent | 54846ed0a708d57d25ac5eadd618f8137867df66 (diff) | |
download | dexon-solidity-32c9da9419499bf839f239ef3e1a8df627218ade.tar.gz dexon-solidity-32c9da9419499bf839f239ef3e1a8df627218ade.tar.zst dexon-solidity-32c9da9419499bf839f239ef3e1a8df627218ade.zip |
Merge pull request #5593 from ethereum/issue-5384
Fix expression simplifier asserting on default values
Diffstat (limited to 'libyul')
-rw-r--r-- | libyul/optimiser/SimplificationRules.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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, Expression const*> { YulString varName = boost::get<Identifier>(_expr).name; if (_ssaValues.count(varName)) - expr = _ssaValues.at(varName); + if (Expression const* new_expr = _ssaValues.at(varName)) + expr = new_expr; } assertThrow(expr, OptimizerException, ""); |