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 continue stmt below.
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
x := 3
|
|
|
|
}
|
|
|
|
mstore(x, 0x42)
|
2019-03-18 16:43:28 +00:00
|
|
|
}
|
|
|
|
// ----
|
2020-03-17 22:31:56 +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-05-08 10:41:19 +00:00
|
|
|
// for { } calldataload(0) { }
|
2019-03-18 16:43:28 +00:00
|
|
|
// {
|
|
|
|
// if callvalue()
|
|
|
|
// {
|
|
|
|
// x := 2
|
|
|
|
// continue
|
|
|
|
// }
|
|
|
|
// x := 3
|
|
|
|
// }
|
|
|
|
// mstore(x, 0x42)
|
|
|
|
// }
|