From 1bdc7eed319d65b3151cb2968ffd7020726f42e6 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 16 Nov 2015 11:47:19 +0100 Subject: Work around bug in MSVC/Boost for u256->unsigned conversion. --- test/libsolidity/SolidityOptimizer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/libsolidity/SolidityOptimizer.cpp b/test/libsolidity/SolidityOptimizer.cpp index 20d59a04..7db4f431 100644 --- a/test/libsolidity/SolidityOptimizer.cpp +++ b/test/libsolidity/SolidityOptimizer.cpp @@ -359,6 +359,16 @@ BOOST_AUTO_TEST_CASE(store_tags_as_unions) // BOOST_CHECK_EQUAL(2, numSHA3s); } +BOOST_AUTO_TEST_CASE(successor_not_found_bug) +{ + // This bug was caused because MSVC chose to use the u256->bool conversion + // instead of u256->unsigned + char const* sourceCode = R"( + contract greeter { function greeter() {} } + )"; + compileBothVersions(sourceCode); +} + BOOST_AUTO_TEST_CASE(cse_intermediate_swap) { eth::KnownState state; -- cgit