mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests.
This commit is contained in:
parent
439a225cee
commit
246c1c939f
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
for {} calldatasize() { mstore(1, 2) } {
|
||||||
|
mstore(4, 5)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// step: controlFlowSimplifier
|
||||||
|
// ----
|
||||||
|
// {
|
||||||
|
// if calldatasize() { mstore(4, 5) }
|
||||||
|
// }
|
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
for {} calldatasize() { mstore(8, 9) } {
|
||||||
|
for {} calldatasize() { mstore(1, 2) } {
|
||||||
|
mstore(4, 5)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if mload(10) { continue }
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// step: controlFlowSimplifier
|
||||||
|
// ----
|
||||||
|
// {
|
||||||
|
// for { } calldatasize() { mstore(8, 9) }
|
||||||
|
// {
|
||||||
|
// if calldatasize() { mstore(4, 5) }
|
||||||
|
// if mload(10) { continue }
|
||||||
|
// break
|
||||||
|
// }
|
||||||
|
// }
|
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
for {} calldatasize() { mstore(8, 9) } {
|
||||||
|
for {} calldatasize() { mstore(1, 2) } {
|
||||||
|
mstore(4, 5)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// step: controlFlowSimplifier
|
||||||
|
// ----
|
||||||
|
// {
|
||||||
|
// if calldatasize()
|
||||||
|
// {
|
||||||
|
// for { } calldatasize() { mstore(1, 2) }
|
||||||
|
// {
|
||||||
|
// mstore(4, 5)
|
||||||
|
// continue
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
for {} calldatasize() { mstore(1, 2) } {
|
||||||
|
let x := 7
|
||||||
|
mstore(4, 5)
|
||||||
|
revert(0, x)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// step: controlFlowSimplifier
|
||||||
|
// ----
|
||||||
|
// {
|
||||||
|
// if calldatasize()
|
||||||
|
// {
|
||||||
|
// let x := 7
|
||||||
|
// mstore(4, 5)
|
||||||
|
// revert(0, x)
|
||||||
|
// }
|
||||||
|
// }
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
for {} calldatasize() { mstore(1, 2) } {
|
||||||
|
let x := 7
|
||||||
|
mstore(4, 5)
|
||||||
|
break
|
||||||
|
revert(0, x)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// step: controlFlowSimplifier
|
||||||
|
// ----
|
||||||
|
// {
|
||||||
|
// for { } calldatasize() { mstore(1, 2) }
|
||||||
|
// {
|
||||||
|
// let x := 7
|
||||||
|
// mstore(4, 5)
|
||||||
|
// break
|
||||||
|
// revert(0, x)
|
||||||
|
// }
|
||||||
|
// }
|
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
for {} calldatasize() { mstore(1, 2) } {
|
||||||
|
if calldatasize() { continue }
|
||||||
|
mstore(4, 5)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// step: controlFlowSimplifier
|
||||||
|
// ----
|
||||||
|
// {
|
||||||
|
// for { } calldatasize() { mstore(1, 2) }
|
||||||
|
// {
|
||||||
|
// if calldatasize() { continue }
|
||||||
|
// mstore(4, 5)
|
||||||
|
// break
|
||||||
|
// }
|
||||||
|
// }
|
Loading…
Reference in New Issue
Block a user