Merge pull request #6207 from ethereum/fixStructuralVisitationOrder

Fix visitation order bug for structural simplifier.
This commit is contained in:
chriseth
2019-03-06 21:29:17 +01:00
committed by GitHub
4 changed files with 24 additions and 7 deletions
@@ -0,0 +1,13 @@
{
// This tests that a bug is fixed where x := 1 was wrongfully
// taken into account before actually visiting the if statement.
let x := 0
if x {
x := 1
}
}
// ----
// structuralSimplifier
// {
// let x := 0
// }
@@ -1,6 +1,6 @@
{
let y := 200
switch y
switch calldataload(0)
case 0 { }
case 1 { y := 9 }
default { y := 100 }
@@ -9,7 +9,7 @@
// structuralSimplifier
// {
// let y := 200
// switch y
// switch calldataload(0)
// case 0 {
// }
// case 1 {