Merge pull request #1599 from ethereum/fixErrorTagLLL

Fix error tag usage in lll.
This commit is contained in:
Alex Beregszaszi
2017-01-23 15:26:19 +00:00
committed by GitHub
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ void Assembly::append(Assembly const& _a)
auto newDeposit = m_deposit + _a.deposit();
for (AssemblyItem i: _a.m_items)
{
if (i.type() == Tag || i.type() == PushTag)
if (i.type() == Tag || (i.type() == PushTag && i != errorTag()))
i.setData(i.data() + m_usedTags);
else if (i.type() == PushSub || i.type() == PushSubSize)
i.setData(i.data() + m_subs.size());
+7
View File
@@ -50,6 +50,13 @@ BOOST_AUTO_TEST_CASE(bare_panic)
BOOST_REQUIRE(m_output.empty());
}
BOOST_AUTO_TEST_CASE(panic)
{
char const* sourceCode = "{ (panic) }";
compileAndRunWithoutCheck(sourceCode);
BOOST_REQUIRE(m_output.empty());
}
BOOST_AUTO_TEST_CASE(exp_operator_const)
{
char const* sourceCode = R"(