mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
30 lines
585 B
Plaintext
30 lines
585 B
Plaintext
{
|
|
let a := 1
|
|
function f() -> x {invalid()}
|
|
function g() -> y {return(0, 0)}
|
|
for { let i := 1 } iszero(eq(i, 10)) { a := add(i, 1) } {
|
|
let b := f()
|
|
let c := gas()
|
|
let d := g()
|
|
let e := sload(g())
|
|
}
|
|
}
|
|
// ----
|
|
// step: loopInvariantCodeMotion
|
|
//
|
|
// {
|
|
// let a := 1
|
|
// function f() -> x
|
|
// { invalid() }
|
|
// function g() -> y
|
|
// { return(0, 0) }
|
|
// let i := 1
|
|
// for { } iszero(eq(i, 10)) { a := add(i, 1) }
|
|
// {
|
|
// let b := f()
|
|
// let c := gas()
|
|
// let d := g()
|
|
// let e := sload(g())
|
|
// }
|
|
// }
|