mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[Yul] Adds another test case for multiple continue statements within a for-loop
This commit is contained in:
parent
834c23fc38
commit
82ced641e5
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
let a
|
||||||
|
let b
|
||||||
|
let c
|
||||||
|
for { let i := 0 }
|
||||||
|
lt(i, 10)
|
||||||
|
{ i := add(add(a, b), c) } // `b` is always known to be caller() but `a` and `c` may be origin() or caller().
|
||||||
|
{
|
||||||
|
a := origin()
|
||||||
|
b := origin()
|
||||||
|
c := origin()
|
||||||
|
|
||||||
|
b := caller()
|
||||||
|
if callvalue() { continue }
|
||||||
|
a := caller()
|
||||||
|
|
||||||
|
if callvalue() { continue }
|
||||||
|
c := caller()
|
||||||
|
}
|
||||||
|
mstore(a, b)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// rematerialiser
|
||||||
|
// {
|
||||||
|
// let a
|
||||||
|
// let b
|
||||||
|
// let c
|
||||||
|
// for {
|
||||||
|
// let i := 0
|
||||||
|
// }
|
||||||
|
// lt(i, 10)
|
||||||
|
// {
|
||||||
|
// i := add(add(a, caller()), c)
|
||||||
|
// }
|
||||||
|
// {
|
||||||
|
// a := origin()
|
||||||
|
// b := origin()
|
||||||
|
// c := origin()
|
||||||
|
// b := caller()
|
||||||
|
// if callvalue()
|
||||||
|
// {
|
||||||
|
// continue
|
||||||
|
// }
|
||||||
|
// a := caller()
|
||||||
|
// if callvalue()
|
||||||
|
// {
|
||||||
|
// continue
|
||||||
|
// }
|
||||||
|
// c := caller()
|
||||||
|
// }
|
||||||
|
// mstore(a, b)
|
||||||
|
// }
|
Loading…
Reference in New Issue
Block a user