mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests and Changelog
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{
|
||||
let b := 1
|
||||
for { let a := 1 } iszero(eq(a, 10)) { a := add(a, 1) } {
|
||||
let inv := add(b, 42)
|
||||
let x := mload(mul(inv, 3))
|
||||
let y := keccak256(mul(b, 13), 32)
|
||||
a := add(x, 1)
|
||||
sstore(a, inv)
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// step: loopInvariantCodeMotion
|
||||
//
|
||||
// {
|
||||
// let b := 1
|
||||
// let a := 1
|
||||
// let inv := add(b, 42)
|
||||
// let x := mload(mul(inv, 3))
|
||||
// let y := keccak256(mul(b, 13), 32)
|
||||
// for { } iszero(eq(a, 10)) { a := add(a, 1) }
|
||||
// {
|
||||
// a := add(x, 1)
|
||||
// sstore(a, inv)
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user