solidity/test/libsolidity/semanticTests/viaYul/storage/dirty_storage_bytes_long.sol

20 lines
429 B
Solidity
Raw Normal View History

contract C {
bytes b;
function f() public returns (bool correct) {
assembly {
sstore(b_slot, 0x41)
mstore(0, b_slot)
sstore(keccak256(0, 0x20), "deadbeefdeadbeefdeadbeefdeadbeef")
}
byte s = b[31];
uint r;
assembly {
r := s
}
correct = r == (0x66 << 248);
}
}
// ====
// compileViaYul: also
// ----
// f() -> true