mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
+2
@@ -12,5 +12,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: false
|
||||
// ----
|
||||
// f() -> 0x6465616462656566313564656164000000000000000000000000000000000010
|
||||
+18
@@ -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
|
||||
Reference in New Issue
Block a user