mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
28 lines
434 B
Plaintext
28 lines
434 B
Plaintext
{
|
|
let x
|
|
// Cannot be removed, because we might run the loop only once
|
|
x := 1
|
|
for { } calldataload(0) { }
|
|
{
|
|
mstore(x, 2)
|
|
// Cannot be removed because of the line above
|
|
x := 2
|
|
}
|
|
x := 3
|
|
}
|
|
// ----
|
|
// redundantAssignEliminator
|
|
// {
|
|
// let x
|
|
// x := 1
|
|
// for {
|
|
// }
|
|
// calldataload(0)
|
|
// {
|
|
// }
|
|
// {
|
|
// mstore(x, 2)
|
|
// x := 2
|
|
// }
|
|
// }
|