Merge pull request #10023 from ethereum/develop

Merge develop into breaking.
This commit is contained in:
chriseth
2020-10-13 18:18:53 +02:00
committed by GitHub
62 changed files with 221 additions and 113 deletions
@@ -4,8 +4,8 @@ pragma solidity >=0.0;
contract Arraysum {
uint256[] values;
function sumArray() public view returns(uint) {
uint sum = 0;
function sumArray() public view returns(uint sum) {
sum = 0;
// The optimizer should read the length of the array only once, because
// LoopInvariantCodeMotion can move the `sload` corresponding to the length outside of the
// loop.
@@ -43,7 +43,7 @@ object "Arraysum_33" {
vloc_sum := add(vloc_sum, _3)
}
let memPos := allocateMemory(_1)
return(memPos, sub(abi_encode_uint(memPos, _1), memPos))
return(memPos, sub(abi_encode_uint(memPos, vloc_sum), memPos))
}
}
revert(0, 0)