mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
17 lines
349 B
Solidity
17 lines
349 B
Solidity
contract C {
|
|
function f() public view returns (bool ret) {
|
|
assembly {
|
|
let x := calldataload(0)
|
|
mstore(0, x)
|
|
mstore(0x20, x)
|
|
let a := keccak256(0, 4)
|
|
let b := keccak256(0x20, 4)
|
|
ret := eq(a, b)
|
|
}
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// ----
|
|
// f() -> true
|