Test for unbalanced stack due to loading two values from outside.

This commit is contained in:
chriseth 2017-02-20 12:32:31 +01:00
parent 419ab9260e
commit 5cd01ab7d1

View File

@ -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"(