mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Test for unbalanced stack due to loading two values from outside.
This commit is contained in:
parent
419ab9260e
commit
5cd01ab7d1
@ -4852,6 +4852,19 @@ BOOST_AUTO_TEST_CASE(inline_assembly_unbalanced_negative_stack)
|
||||
CHECK_WARNING(text, "Inline assembly block is not balanced");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(inline_assembly_unbalanced_two_stack_load)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract c {
|
||||
uint8 x;
|
||||
function f() {
|
||||
assembly { x pop }
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_WARNING(text, "Inline assembly block is not balanced");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(inline_assembly_in_modifier)
|
||||
{
|
||||
char const* text = R"(
|
||||
|
Loading…
Reference in New Issue
Block a user