solidity/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_read_and_write_stack.sol
2020-03-19 14:42:25 +01:00

14 lines
229 B
Solidity

contract C {
function f() public returns (uint256 r) {
for (uint256 x = 0; x < 10; ++x)
assembly {
r := add(r, x)
}
}
}
// ====
// compileViaYul: also
// ----
// f() -> 45