mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Fix ICE on index access assignment inside single branches
This commit is contained in:
parent
79f4a2b476
commit
b90fb1cab6
@ -27,6 +27,7 @@ Bugfixes:
|
|||||||
* Code Generator: Trigger proper unimplemented errors on certain array copy operations.
|
* Code Generator: Trigger proper unimplemented errors on certain array copy operations.
|
||||||
* SMTChecker: Fix internal error when applying arithmetic operators to fixed point variables.
|
* SMTChecker: Fix internal error when applying arithmetic operators to fixed point variables.
|
||||||
* SMTChecker: Fix internal error when short circuiting Boolean expressions with function calls in state variable initialization.
|
* SMTChecker: Fix internal error when short circuiting Boolean expressions with function calls in state variable initialization.
|
||||||
|
* SMTChecker: Fix internal error when assigning to index access inside branches.
|
||||||
|
|
||||||
### 0.6.8 (2020-05-14)
|
### 0.6.8 (2020-05-14)
|
||||||
|
|
||||||
|
@ -361,7 +361,12 @@ void SMTEncoder::endVisit(Assignment const& _assignment)
|
|||||||
else if (!smt::isSupportedType(_assignment.annotation().type->category()))
|
else if (!smt::isSupportedType(_assignment.annotation().type->category()))
|
||||||
{
|
{
|
||||||
// Give it a new index anyway to keep the SSA scheme sound.
|
// Give it a new index anyway to keep the SSA scheme sound.
|
||||||
if (auto varDecl = identifierToVariable(_assignment.leftHandSide()))
|
|
||||||
|
Expression const* base = &_assignment.leftHandSide();
|
||||||
|
if (auto const* indexAccess = dynamic_cast<IndexAccess const*>(base))
|
||||||
|
base = leftmostBase(*indexAccess);
|
||||||
|
|
||||||
|
if (auto varDecl = identifierToVariable(*base))
|
||||||
m_context.newValue(*varDecl);
|
m_context.newValue(*varDecl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user