Fix accessing memory reference types in yul codegen and clean up on memory reads.

This commit is contained in:
Daniel Kirchner
2020-05-06 11:34:11 +02:00
parent 4c1e821e01
commit c25a3eba14
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