Merge pull request #10677 from ethereum/dirtyMemoryBytesSol2Yul

[Sol->Yul] Disable old codegen test viaYul and create new one that fits IR semantics
This commit is contained in:
chriseth
2020-12-22 16:22:38 +01:00
committed by GitHub
3 changed files with 44 additions and 0 deletions
@@ -12,5 +12,7 @@ contract C {
}
}
}
// ====
// compileViaYul: false
// ----
// f() -> 0x6465616462656566313564656164000000000000000000000000000000000010
@@ -0,0 +1,18 @@
contract C {
bytes x;
function f() public returns (uint r) {
bytes memory m = "tmp";
assembly {
mstore(m, 8)
mstore(add(m, 32), "deadbeef15dead")
}
x = m;
assembly {
r := sload(x.slot)
}
}
}
// ====
// compileViaYul: true
// ----
// f() -> 0x6465616462656566000000000000000000000000000000000000000000000010