mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user