Merge pull request #8824 from ethereum/solYulDirtyMemory

Fix accessing memory reference types in yul codegen and clean up on memory reads.
This commit is contained in:
chriseth
2020-05-06 16:17:19 +02:00
committed by GitHub
4 changed files with 32 additions and 17 deletions
@@ -0,0 +1,15 @@
contract C {
function f() public pure returns (uint8 x, bool a, bool b) {
uint8[1] memory m;
assembly {
mstore(m, 257)
}
x = m[0];
a = (m[0] == 0x01);
b = (m[0] == 0x0101);
}
}
// ====
// compileViaYul: also
// ----
// f() -> 1, true, false