2019-03-18 16:43:28 +00:00
|
|
|
{
|
2019-03-26 16:35:26 +00:00
|
|
|
let x
|
|
|
|
// Cannot be removed, because we might skip the loop
|
|
|
|
x := 1
|
|
|
|
for { } calldataload(0) { }
|
|
|
|
{
|
|
|
|
if callvalue() {
|
|
|
|
x := 2 // is preserved because of break stmt below.
|
|
|
|
break
|
|
|
|
}
|
|
|
|
x := 3
|
|
|
|
}
|
|
|
|
mstore(x, 0x42)
|
2019-03-18 16:43:28 +00:00
|
|
|
}
|
2019-04-01 14:33:46 +00:00
|
|
|
// ====
|
|
|
|
// step: redundantAssignEliminator
|
2019-03-18 16:43:28 +00:00
|
|
|
// ----
|
|
|
|
// {
|
2019-03-26 16:35:26 +00:00
|
|
|
// let x
|
|
|
|
// x := 1
|
2019-03-18 16:43:28 +00:00
|
|
|
// for {
|
|
|
|
// }
|
|
|
|
// calldataload(0)
|
|
|
|
// {
|
|
|
|
// }
|
|
|
|
// {
|
|
|
|
// if callvalue()
|
|
|
|
// {
|
|
|
|
// x := 2
|
|
|
|
// break
|
|
|
|
// }
|
|
|
|
// x := 3
|
|
|
|
// }
|
|
|
|
// mstore(x, 0x42)
|
|
|
|
// }
|