mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
19 lines
416 B
Solidity
19 lines
416 B
Solidity
|
contract C {
|
||
|
function f() public pure returns (bool correct) {
|
||
|
uint256[1] memory m;
|
||
|
assembly {
|
||
|
mstore(m, 0xdeadbeef15dead)
|
||
|
}
|
||
|
int32 x = int32(m[0]);
|
||
|
uint r;
|
||
|
assembly {
|
||
|
r := x
|
||
|
}
|
||
|
correct = (m[0] == 0xdeadbeef15dead) && (r == (((2 ** 224 - 1) << 32) | 0xef15dead));
|
||
|
}
|
||
|
}
|
||
|
// ====
|
||
|
// compileViaYul: true
|
||
|
// ----
|
||
|
// f() -> true
|