diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-01-23 23:26:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-23 23:26:19 +0800 |
commit | c5a501addd2c339621af76db86bcf87c7111fc8d (patch) | |
tree | 9074bf3487eb97271f7ae80887e55da5f17852fc | |
parent | 9c278448c8f61f752393b7950df3b47d3d5d0437 (diff) | |
parent | 0cb95ac35e4ae2ce1b9f929c00a2aed282bd4a70 (diff) | |
download | dexon-solidity-c5a501addd2c339621af76db86bcf87c7111fc8d.tar.gz dexon-solidity-c5a501addd2c339621af76db86bcf87c7111fc8d.tar.zst dexon-solidity-c5a501addd2c339621af76db86bcf87c7111fc8d.zip |
Merge pull request #1599 from ethereum/fixErrorTagLLL
Fix error tag usage in lll.
-rw-r--r-- | libevmasm/Assembly.cpp | 2 | ||||
-rw-r--r-- | test/liblll/EndToEndTest.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index 845abfd4..0247593b 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -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()); diff --git a/test/liblll/EndToEndTest.cpp b/test/liblll/EndToEndTest.cpp index 77c1f740..c7c1fd3b 100644 --- a/test/liblll/EndToEndTest.cpp +++ b/test/liblll/EndToEndTest.cpp @@ -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"( |