solidity/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_read_and_write_stack.sol

14 lines
229 B
Solidity
Raw Normal View History

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