mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
19 lines
340 B
Solidity
19 lines
340 B
Solidity
|
contract C {
|
||
|
bytes b;
|
||
|
function f() public returns (bool correct) {
|
||
|
assembly {
|
||
|
sstore(b_slot, or("deadbeef", 0x08))
|
||
|
}
|
||
|
byte s = b[3];
|
||
|
uint r;
|
||
|
assembly {
|
||
|
r := s
|
||
|
}
|
||
|
correct = r == (0x64 << 248);
|
||
|
}
|
||
|
}
|
||
|
// ====
|
||
|
// compileViaYul: also
|
||
|
// ----
|
||
|
// f() -> true
|