solidity/test/libyul/functionSideEffects/mload_in_function.yul

12 lines
251 B
Plaintext
Raw Normal View History

2019-12-17 12:41:56 +00:00
{
function foo(x) {
for {} x { x := mload(0) mstore(0, 0)} {}
}
mstore(0, 1337)
foo(42)
sstore(0, mload(0))
}
// ----
2020-07-01 10:07:00 +00:00
// : can loop, writes storage, writes memory
// foo: can loop, writes memory