mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Prepare testcase for avoiding double cleanup
This commit is contained in:
parent
13e19529c3
commit
f47981d484
@ -708,6 +708,18 @@ BOOST_AUTO_TEST_CASE(shift_optimizer_bug)
|
||||
compareVersions("g(uint256)", u256(-1));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(avoid_double_cleanup)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract C {
|
||||
receive() external payable {
|
||||
abi.encodePacked(uint200(0));
|
||||
}
|
||||
}
|
||||
)";
|
||||
compileBothVersions(sourceCode, 0, "C", 50);
|
||||
BOOST_CHECK_EQUAL(numInstructions(m_nonOptimizedBytecode, Instruction::AND), 2);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user