mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
33 lines
568 B
Plaintext
33 lines
568 B
Plaintext
{
|
|
let x
|
|
// Can be removed, because x is not used after the loop.
|
|
x := 1
|
|
for { } calldataload(0) { mstore(x, 0x42) }
|
|
{
|
|
if callvalue() {
|
|
x := 2 // is preserved because of continue stmt below.
|
|
continue
|
|
}
|
|
x := 3
|
|
}
|
|
}
|
|
// ----
|
|
// redundantAssignEliminator
|
|
// {
|
|
// let x
|
|
// for {
|
|
// }
|
|
// calldataload(0)
|
|
// {
|
|
// mstore(x, 0x42)
|
|
// }
|
|
// {
|
|
// if callvalue()
|
|
// {
|
|
// x := 2
|
|
// continue
|
|
// }
|
|
// x := 3
|
|
// }
|
|
// }
|