mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into HEAD
This commit is contained in:
@@ -9,7 +9,7 @@ IR:
|
||||
|
||||
object "C_80" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_C_80()
|
||||
@@ -25,7 +25,7 @@ object "C_80" {
|
||||
}
|
||||
object "C_80_deployed" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ Optimized IR:
|
||||
object "C_6" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("C_6_deployed")
|
||||
codecopy(0, dataoffset("C_6_deployed"), _1)
|
||||
@@ -19,7 +19,7 @@ object "C_6" {
|
||||
object "C_6_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
revert(0, 0)
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ Optimized IR:
|
||||
object "D_9" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("D_9_deployed")
|
||||
codecopy(0, dataoffset("D_9_deployed"), _1)
|
||||
@@ -47,7 +47,7 @@ object "D_9" {
|
||||
object "D_9_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
revert(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ Optimized IR:
|
||||
object "C_2" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("C_2_deployed")
|
||||
codecopy(0, dataoffset("C_2_deployed"), _1)
|
||||
@@ -19,7 +19,7 @@ object "C_2" {
|
||||
object "C_2_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
revert(0, 0)
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ Optimized IR:
|
||||
object "D_15" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("D_15_deployed")
|
||||
codecopy(0, dataoffset("D_15_deployed"), _1)
|
||||
@@ -47,21 +47,20 @@ object "D_15" {
|
||||
object "D_15_deployed" {
|
||||
code {
|
||||
{
|
||||
let _1 := memoryguard(0x80)
|
||||
mstore(64, _1)
|
||||
mstore(64, 128)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _2 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_2)))
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
{
|
||||
if callvalue() { revert(_2, _2) }
|
||||
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
|
||||
let _3 := datasize("C_2")
|
||||
let _4 := add(_1, _3)
|
||||
if or(gt(_4, 0xffffffffffffffff), lt(_4, _1)) { invalid() }
|
||||
datacopy(_1, dataoffset("C_2"), _3)
|
||||
pop(create(_2, _1, sub(_4, _1)))
|
||||
return(allocateMemory(_2), _2)
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
let _2 := datasize("C_2")
|
||||
let _3 := add(128, _2)
|
||||
if or(gt(_3, 0xffffffffffffffff), lt(_3, 128)) { invalid() }
|
||||
datacopy(128, dataoffset("C_2"), _2)
|
||||
pop(create(_1, 128, _2))
|
||||
return(allocateMemory(_1), _1)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
@@ -77,7 +76,7 @@ object "D_15" {
|
||||
object "C_2" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("C_2_deployed")
|
||||
codecopy(0, dataoffset("C_2_deployed"), _1)
|
||||
@@ -87,7 +86,7 @@ object "D_15" {
|
||||
object "C_2_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
revert(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,18 +19,16 @@ object "D_11" {
|
||||
object "D_11_deployed" {
|
||||
code {
|
||||
{
|
||||
let _1 := memoryguard(0x80)
|
||||
mstore(64, _1)
|
||||
mstore(64, 128)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _2 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_2)))
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
{
|
||||
if callvalue() { revert(_2, _2) }
|
||||
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
|
||||
if gt(_1, 0xffffffffffffffff) { invalid() }
|
||||
mstore(64, _1)
|
||||
return(_1, _2)
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
mstore(64, 128)
|
||||
return(128, _1)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
||||
@@ -9,7 +9,7 @@ Optimized IR:
|
||||
object "D_7" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("D_7_deployed")
|
||||
codecopy(0, dataoffset("D_7_deployed"), _1)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
--model-checker-engine all
|
||||
@@ -0,0 +1,13 @@
|
||||
Warning: CHC: Assertion violation happens here.
|
||||
--> model_checker_engine_all/input.sol:6:3:
|
||||
|
|
||||
6 | assert(x > 0);
|
||||
| ^^^^^^^^^^^^^
|
||||
Note: Counterexample:
|
||||
|
||||
x = 0
|
||||
|
||||
|
||||
Transaction trace:
|
||||
constructor()
|
||||
f(0)
|
||||
@@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
pragma experimental SMTChecker;
|
||||
contract test {
|
||||
function f(uint x) public pure {
|
||||
assert(x > 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
--model-checker-engine bmc
|
||||
@@ -0,0 +1,10 @@
|
||||
Warning: BMC: Assertion violation happens here.
|
||||
--> model_checker_engine_bmc/input.sol:6:3:
|
||||
|
|
||||
6 | assert(x > 0);
|
||||
| ^^^^^^^^^^^^^
|
||||
Note: Counterexample:
|
||||
x = 0
|
||||
|
||||
Note: Callstack:
|
||||
Note:
|
||||
@@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
pragma experimental SMTChecker;
|
||||
contract test {
|
||||
function f(uint x) public pure {
|
||||
assert(x > 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
--model-checker-engine chc
|
||||
@@ -0,0 +1,13 @@
|
||||
Warning: CHC: Assertion violation happens here.
|
||||
--> model_checker_engine_chc/input.sol:6:3:
|
||||
|
|
||||
6 | assert(x > 0);
|
||||
| ^^^^^^^^^^^^^
|
||||
Note: Counterexample:
|
||||
|
||||
x = 0
|
||||
|
||||
|
||||
Transaction trace:
|
||||
constructor()
|
||||
f(0)
|
||||
@@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
pragma experimental SMTChecker;
|
||||
contract test {
|
||||
function f(uint x) public pure {
|
||||
assert(x > 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
--model-checker-engine none
|
||||
@@ -0,0 +1,5 @@
|
||||
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
|
||||
--> model_checker_engine_none/input.sol
|
||||
|
||||
Warning: Source file does not specify required compiler version!
|
||||
--> model_checker_engine_none/input.sol
|
||||
@@ -0,0 +1,9 @@
|
||||
// Removed to yield a warning, otherwise CI test fails with the expectation
|
||||
// "no output requested"
|
||||
//pragma solidity >=0.0;
|
||||
pragma experimental SMTChecker;
|
||||
contract test {
|
||||
function f(uint x) public pure {
|
||||
assert(x > 0);
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ Optimized IR:
|
||||
object "C_59" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("C_59_deployed")
|
||||
codecopy(0, dataoffset("C_59_deployed"), _1)
|
||||
@@ -19,7 +19,7 @@ object "C_59" {
|
||||
object "C_59_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
|
||||
@@ -9,7 +9,7 @@ Optimized IR:
|
||||
object "Arraysum_33" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("Arraysum_33_deployed")
|
||||
codecopy(0, dataoffset("Arraysum_33_deployed"), _1)
|
||||
@@ -19,7 +19,7 @@ object "Arraysum_33" {
|
||||
object "Arraysum_33_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
object \"C_6\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
constructor_C_6()
|
||||
codecopy(0, dataoffset(\"C_6_deployed\"), datasize(\"C_6_deployed\"))
|
||||
@@ -17,7 +17,7 @@ object \"C_6\" {
|
||||
}
|
||||
object \"C_6_deployed\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let selector := shift_right_224_unsigned(calldataload(0))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
object \"C_6\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_C_6()
|
||||
@@ -24,7 +24,7 @@ object \"C_6\" {
|
||||
}
|
||||
object \"C_6_deployed\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources":
|
||||
{
|
||||
"A":
|
||||
{
|
||||
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\npragma experimental SMTChecker;\ncontract C { function f(uint x) public pure { assert(x > 0); } }"
|
||||
}
|
||||
},
|
||||
"modelCheckerSettings":
|
||||
{
|
||||
"engine": "all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{"errors":[{"component":"general","errorCode":"6328","formattedMessage":"A:4:47: Warning: CHC: Assertion violation happens here.
|
||||
contract C { function f(uint x) public pure { assert(x > 0); } }
|
||||
^-----------^
|
||||
Counterexample:
|
||||
|
||||
x = 0
|
||||
|
||||
|
||||
Transaction trace:
|
||||
constructor()
|
||||
f(0)
|
||||
","message":"CHC: Assertion violation happens here.","secondarySourceLocations":[{"message":"Counterexample:
|
||||
|
||||
x = 0
|
||||
|
||||
|
||||
Transaction trace:
|
||||
constructor()
|
||||
f(0)"}],"severity":"warning","sourceLocation":{"end":150,"file":"A","start":137},"type":"Warning"}],"sources":{"A":{"id":0}}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources":
|
||||
{
|
||||
"A":
|
||||
{
|
||||
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\npragma experimental SMTChecker;\ncontract C { function f(uint x) public pure { assert(x > 0); } }"
|
||||
}
|
||||
},
|
||||
"modelCheckerSettings":
|
||||
{
|
||||
"engine": "bmc"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{"auxiliaryInputRequested":{"smtlib2queries":{"0x8b2c3058077c75f8fff85d2d387198b91b4e591448624f4bef0ab6c7b87d5ec1":"(set-option :produce-models true)
|
||||
(set-logic ALL)
|
||||
(declare-fun |error_0| () Int)
|
||||
(declare-fun |this_0| () Int)
|
||||
(declare-datatypes ((|state_type| 0)) (((|state_type| (|balances| (Array Int Int))))))
|
||||
(declare-fun |state_0| () |state_type|)
|
||||
(declare-datatypes ((|bytes_tuple| 0)) (((|bytes_tuple| (|bytes_tuple_accessor_array| (Array Int Int)) (|bytes_tuple_accessor_length| Int)))))
|
||||
(declare-datatypes ((|tx_type| 0)) (((|tx_type| (|block.coinbase| Int) (|block.difficulty| Int) (|block.gaslimit| Int) (|block.number| Int) (|block.timestamp| Int) (|blockhash| (Array Int Int)) (|msg.data| |bytes_tuple|) (|msg.sender| Int) (|msg.sig| Int) (|msg.value| Int) (|tx.gasprice| Int) (|tx.origin| Int)))))
|
||||
(declare-fun |tx_0| () |tx_type|)
|
||||
(declare-datatypes ((|ecrecover_input_type| 0)) (((|ecrecover_input_type| (|hash| Int) (|v| Int) (|r| Int) (|s| Int)))))
|
||||
(declare-datatypes ((|crypto_type| 0)) (((|crypto_type| (|ecrecover| (Array |ecrecover_input_type| Int)) (|keccak256| (Array |bytes_tuple| Int)) (|ripemd160| (Array |bytes_tuple| Int)) (|sha256| (Array |bytes_tuple| Int))))))
|
||||
(declare-fun |crypto_0| () |crypto_type|)
|
||||
(declare-fun |x_4_0| () Int)
|
||||
(declare-fun |expr_8_0| () Int)
|
||||
(declare-fun |expr_9_0| () Int)
|
||||
(declare-fun |expr_10_1| () Bool)
|
||||
|
||||
(assert (and (and true (and (= expr_10_1 (> expr_8_0 expr_9_0)) (and (= expr_9_0 0) (and (= expr_8_0 x_4_0) (and (and (>= x_4_0 0) (<= x_4_0 115792089237316195423570985008687907853269984665640564039457584007913129639935)) true))))) (not expr_10_1)))
|
||||
(declare-const |EVALEXPR_0| Int)
|
||||
(assert (= |EVALEXPR_0| x_4_0))
|
||||
(check-sat)
|
||||
(get-value (|EVALEXPR_0| ))
|
||||
"}},"errors":[{"component":"general","errorCode":"4661","formattedMessage":"A:4:47: Warning: BMC: Assertion violation happens here.
|
||||
contract C { function f(uint x) public pure { assert(x > 0); } }
|
||||
^-----------^
|
||||
Counterexample:
|
||||
x = 0
|
||||
|
||||
Callstack:
|
||||
|
||||
","message":"BMC: Assertion violation happens here.","secondarySourceLocations":[{"message":"Counterexample:
|
||||
x = 0
|
||||
"},{"message":"Callstack:"},{"message":""}],"severity":"warning","sourceLocation":{"end":150,"file":"A","start":137},"type":"Warning"}],"sources":{"A":{"id":0}}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources":
|
||||
{
|
||||
"A":
|
||||
{
|
||||
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\npragma experimental SMTChecker;\ncontract C { function f(uint x) public pure { assert(x > 0); } }"
|
||||
}
|
||||
},
|
||||
"modelCheckerSettings":
|
||||
{
|
||||
"engine": "chc"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{"errors":[{"component":"general","errorCode":"6328","formattedMessage":"A:4:47: Warning: CHC: Assertion violation happens here.
|
||||
contract C { function f(uint x) public pure { assert(x > 0); } }
|
||||
^-----------^
|
||||
Counterexample:
|
||||
|
||||
x = 0
|
||||
|
||||
|
||||
Transaction trace:
|
||||
constructor()
|
||||
f(0)
|
||||
","message":"CHC: Assertion violation happens here.","secondarySourceLocations":[{"message":"Counterexample:
|
||||
|
||||
x = 0
|
||||
|
||||
|
||||
Transaction trace:
|
||||
constructor()
|
||||
f(0)"}],"severity":"warning","sourceLocation":{"end":150,"file":"A","start":137},"type":"Warning"}],"sources":{"A":{"id":0}}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources":
|
||||
{
|
||||
"A":
|
||||
{
|
||||
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\npragma experimental SMTChecker;\ncontract C { function f(uint x) public pure { assert(x > 0); } }"
|
||||
}
|
||||
},
|
||||
"modelCheckerSettings":
|
||||
{
|
||||
"engine": "none"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"sources":{"A":{"id":0}}}
|
||||
@@ -9,7 +9,7 @@ Optimized IR:
|
||||
object "C_6" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
codecopy(0, dataoffset("C_6_deployed"), datasize("C_6_deployed"))
|
||||
return(0, datasize("C_6_deployed"))
|
||||
@@ -18,7 +18,7 @@ object "C_6" {
|
||||
object "C_6_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, memoryguard(0x80))
|
||||
mstore(64, 128)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let selector := shift_right_224_unsigned(calldataload(0))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
object \"C_10\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_C_10()
|
||||
@@ -24,7 +24,7 @@ object \"C_10\" {
|
||||
}
|
||||
object \"C_10_deployed\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
object \"C_10\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_C_10()
|
||||
@@ -24,7 +24,7 @@ object \"C_10\" {
|
||||
}
|
||||
object \"C_10_deployed\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
object \"C_10\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_C_10()
|
||||
@@ -24,7 +24,7 @@ object \"C_10\" {
|
||||
}
|
||||
object \"C_10_deployed\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
object \"C_10\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_C_10()
|
||||
@@ -24,7 +24,7 @@ object \"C_10\" {
|
||||
}
|
||||
object \"C_10_deployed\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
object \"C_10\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_C_10()
|
||||
@@ -24,7 +24,7 @@ object \"C_10\" {
|
||||
}
|
||||
object \"C_10_deployed\" {
|
||||
code {
|
||||
mstore(64, memoryguard(128))
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Error (1834): Unimplemented feature error: Byte Arrays not yet implemented! in FILENAME REMOVED
|
||||
--> yul_unimplemented/input.sol:6:9:
|
||||
Error (1834): Unimplemented feature error: Copying from storage to storage is not yet implemented. in FILENAME REMOVED
|
||||
--> yul_unimplemented/input.sol:7:9:
|
||||
|
|
||||
6 | delete a;
|
||||
| ^^^^^^^^
|
||||
7 | a = b;
|
||||
| ^^^^^
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
pragma solidity >=0.0;
|
||||
contract test {
|
||||
bytes a;
|
||||
bytes b;
|
||||
function f() public {
|
||||
delete a;
|
||||
a = b;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
contract C {
|
||||
function f(bytes calldata x) public returns (C[] memory) {
|
||||
return abi.decode(x, (C[]));
|
||||
}
|
||||
function g() public returns (bytes memory) {
|
||||
C[] memory c = new C[](3);
|
||||
c[0] = C(address(0x42));
|
||||
c[1] = C(address(0x21));
|
||||
c[2] = C(address(0x23));
|
||||
return abi.encode(c);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(bytes): 0x20, 0xA0, 0x20, 3, 0x01, 0x02, 0x03 -> 0x20, 3, 0x01, 0x02, 0x03
|
||||
// g() -> 0x20, 0xa0, 0x20, 3, 0x42, 0x21, 0x23
|
||||
@@ -0,0 +1,20 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
contract C {
|
||||
function f(bytes calldata x) public returns (C[] memory) {
|
||||
return abi.decode(x, (C[]));
|
||||
}
|
||||
function g() public returns (bytes memory) {
|
||||
C[] memory c = new C[](3);
|
||||
c[0] = C(address(0x42));
|
||||
c[1] = C(address(0x21));
|
||||
c[2] = C(address(0x23));
|
||||
return abi.encode(c);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(bytes): 0x20, 0xA0, 0x20, 3, 0x01, 0x02, 0x03 -> 0x20, 3, 0x01, 0x02, 0x03
|
||||
// f(bytes): 0x20, 0x60, 0x20, 1, 0x0102030405060708090a0b0c0d0e0f1011121314 -> 0x20, 1, 0x0102030405060708090a0b0c0d0e0f1011121314
|
||||
// f(bytes): 0x20, 0x60, 0x20, 1, 0x0102030405060708090a0b0c0d0e0f101112131415 -> FAILURE
|
||||
// g() -> 0x20, 0xa0, 0x20, 3, 0x42, 0x21, 0x23
|
||||
@@ -32,6 +32,7 @@ contract c {
|
||||
data.push(bytes1(i));
|
||||
}
|
||||
data.pop();
|
||||
data.pop();
|
||||
assembly {
|
||||
r := sload(data.slot)
|
||||
}
|
||||
@@ -42,4 +43,4 @@ contract c {
|
||||
// ----
|
||||
// test_short() -> 1780731860627700044960722568376587075150542249149356309979516913770823710
|
||||
// test_long() -> 67
|
||||
// test_pop() -> 1780731860627700044960722568376592200742329637303199754547598369979440702
|
||||
// test_pop() -> 1780731860627700044960722568376592200742329637303199754547598369979433020
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
contract C {
|
||||
bytes data;
|
||||
|
||||
function f() public returns (uint ret) {
|
||||
data.push("a");
|
||||
data.push("b");
|
||||
delete data;
|
||||
assembly {
|
||||
ret := sload(data.slot)
|
||||
}
|
||||
}
|
||||
|
||||
function g() public returns (uint ret) {
|
||||
assembly {
|
||||
sstore(data.slot, 67)
|
||||
}
|
||||
data.push("a");
|
||||
data.push("b");
|
||||
assert(data.length == 35);
|
||||
delete data;
|
||||
assert(data.length == 0);
|
||||
|
||||
uint size = 999;
|
||||
assembly {
|
||||
size := sload(data.slot)
|
||||
mstore(0, data.slot)
|
||||
ret := sload(keccak256(0, 32))
|
||||
}
|
||||
assert(size == 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0
|
||||
// g() -> 0
|
||||
@@ -1,53 +0,0 @@
|
||||
contract C {
|
||||
uint256[1024] s;
|
||||
function f() public returns (uint256 x) {
|
||||
x = 42;
|
||||
uint256 x0 = s[0];
|
||||
uint256 x1 = s[1];
|
||||
uint256 x2 = s[2];
|
||||
uint256 x3 = s[3];
|
||||
uint256 x4 = s[4];
|
||||
uint256 x5 = s[5];
|
||||
uint256 x6 = s[6];
|
||||
uint256 x7 = s[7];
|
||||
uint256 x8 = s[8];
|
||||
uint256 x9 = s[9];
|
||||
uint256 x10 = s[10];
|
||||
uint256 x11 = s[11];
|
||||
uint256 x12 = s[12];
|
||||
uint256 x13 = s[13];
|
||||
uint256 x14 = s[14];
|
||||
uint256 x15 = s[15];
|
||||
uint256 x16 = s[16];
|
||||
uint256 x17 = s[17];
|
||||
uint256 x18 = s[18];
|
||||
s[1000] = x0 + 2;
|
||||
s[118] = x18;
|
||||
s[117] = x17;
|
||||
s[116] = x16;
|
||||
s[115] = x15;
|
||||
s[114] = x14;
|
||||
s[113] = x13;
|
||||
s[112] = x12;
|
||||
s[111] = x11;
|
||||
s[110] = x10;
|
||||
s[109] = x9;
|
||||
s[108] = x8;
|
||||
s[107] = x7;
|
||||
s[106] = x6;
|
||||
s[105] = x5;
|
||||
s[104] = x4;
|
||||
s[103] = x3;
|
||||
s[102] = x2;
|
||||
s[101] = x1;
|
||||
s[100] = x0;
|
||||
}
|
||||
function test() public view returns(uint256) {
|
||||
return s[1000];
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> 0x2a
|
||||
// test() -> 2
|
||||
@@ -1,57 +0,0 @@
|
||||
contract C {
|
||||
uint256[1024] s;
|
||||
function g() public returns (uint256) {
|
||||
// try to prevent inlining
|
||||
return f() + f() + f() + f() + f();
|
||||
}
|
||||
function f() public returns (uint256 x) {
|
||||
x = 42;
|
||||
uint256 x0 = s[0];
|
||||
uint256 x1 = s[1];
|
||||
uint256 x2 = s[2];
|
||||
uint256 x3 = s[3];
|
||||
uint256 x4 = s[4];
|
||||
uint256 x5 = s[5];
|
||||
uint256 x6 = s[6];
|
||||
uint256 x7 = s[7];
|
||||
uint256 x8 = s[8];
|
||||
uint256 x9 = s[9];
|
||||
uint256 x10 = s[10];
|
||||
uint256 x11 = s[11];
|
||||
uint256 x12 = s[12];
|
||||
uint256 x13 = s[13];
|
||||
uint256 x14 = s[14];
|
||||
uint256 x15 = s[15];
|
||||
uint256 x16 = s[16];
|
||||
uint256 x17 = s[17];
|
||||
uint256 x18 = s[18];
|
||||
s[1000] = x0 + 2;
|
||||
s[118] = x18;
|
||||
s[117] = x17;
|
||||
s[116] = x16;
|
||||
s[115] = x15;
|
||||
s[114] = x14;
|
||||
s[113] = x13;
|
||||
s[112] = x12;
|
||||
s[111] = x11;
|
||||
s[110] = x10;
|
||||
s[109] = x9;
|
||||
s[108] = x8;
|
||||
s[107] = x7;
|
||||
s[106] = x6;
|
||||
s[105] = x5;
|
||||
s[104] = x4;
|
||||
s[103] = x3;
|
||||
s[102] = x2;
|
||||
s[101] = x1;
|
||||
s[100] = x0;
|
||||
}
|
||||
function test() public view returns(uint256) {
|
||||
return s[1000];
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> 0x2a
|
||||
// test() -> 2
|
||||
@@ -0,0 +1,16 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
function f(bytes memory data) public pure {
|
||||
bytes32 k = keccak256(data);
|
||||
bytes32 s = sha256(data);
|
||||
bytes32 r = ripemd160(data);
|
||||
assert(k == s);
|
||||
assert(s == r);
|
||||
assert(r == k);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (183-197): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (201-215): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (219-233): CHC: Assertion violation happens here.
|
||||
@@ -0,0 +1,32 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
function k(bytes memory b0, bytes memory b1) public pure {
|
||||
bytes32 k0 = keccak256(b0);
|
||||
bytes32 k1 = keccak256(b1);
|
||||
assert(k0 == k1);
|
||||
}
|
||||
function s(bytes memory b0, bytes memory b1) public pure {
|
||||
bytes32 s0 = sha256(b0);
|
||||
bytes32 s1 = sha256(b1);
|
||||
assert(s0 == s1);
|
||||
}
|
||||
function r(bytes memory b0, bytes memory b1) public pure {
|
||||
bytes32 r0 = ripemd160(b0);
|
||||
bytes32 r1 = ripemd160(b1);
|
||||
assert(r0 == r1);
|
||||
}
|
||||
function e(bytes32 h0, uint8 v0, bytes32 r0, bytes32 s0, bytes32 h1, uint8 v1, bytes32 r1, bytes32 s1) public pure {
|
||||
address a0 = ecrecover(h0, v0, r0, s0);
|
||||
address a1 = ecrecover(h1, v1, r1, s1);
|
||||
assert(a0 == a1);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (168-184): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (305-321): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (448-464): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 6328: (673-689): CHC: Assertion violation happens here.
|
||||
// Warning 4661: (168-184): BMC: Assertion violation happens here.
|
||||
// Warning 4661: (305-321): BMC: Assertion violation happens here.
|
||||
// Warning 4661: (448-464): BMC: Assertion violation happens here.
|
||||
@@ -0,0 +1,14 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
function f(bytes memory data) public pure {
|
||||
bytes32 k = keccak256(data);
|
||||
fi(data, k);
|
||||
}
|
||||
function fi(bytes memory data, bytes32 k) internal pure {
|
||||
bytes32 h = sha256(data);
|
||||
assert(h == k);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (229-243): CHC: Assertion violation happens here.
|
||||
@@ -0,0 +1,12 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
function f(bytes memory data) public pure {
|
||||
bytes32 k = keccak256(data);
|
||||
fi(data, k);
|
||||
}
|
||||
function fi(bytes memory data, bytes32 k) internal pure {
|
||||
bytes32 h = keccak256(data);
|
||||
assert(h == k);
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
bytes data;
|
||||
bytes32 h;
|
||||
uint8 v;
|
||||
bytes32 r;
|
||||
bytes32 s;
|
||||
|
||||
bytes32 kec;
|
||||
bytes32 sha;
|
||||
bytes32 rip;
|
||||
address erc;
|
||||
|
||||
constructor(bytes memory _data, bytes32 _h, uint8 _v, bytes32 _r, bytes32 _s) {
|
||||
data = _data;
|
||||
h = _h;
|
||||
v = _v;
|
||||
r = _r;
|
||||
s = _s;
|
||||
|
||||
kec = keccak256(data);
|
||||
sha = sha256(data);
|
||||
rip = ripemd160(data);
|
||||
erc = ecrecover(h, v, r, s);
|
||||
}
|
||||
|
||||
function f() public view {
|
||||
bytes32 _kec = keccak256(data);
|
||||
bytes32 _sha = sha256(data);
|
||||
bytes32 _rip = ripemd160(data);
|
||||
address _erc = ecrecover(h, v, r, s);
|
||||
assert(_kec == kec);
|
||||
assert(_sha == sha);
|
||||
assert(_rip == rip);
|
||||
assert(_erc == erc);
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
bytes data;
|
||||
bytes32 h;
|
||||
uint8 v;
|
||||
bytes32 r;
|
||||
bytes32 s;
|
||||
|
||||
bytes32 kec;
|
||||
bytes32 sha;
|
||||
bytes32 rip;
|
||||
address erc;
|
||||
|
||||
constructor(bytes memory _data, bytes32 _h, uint8 _v, bytes32 _r, bytes32 _s) {
|
||||
data = _data;
|
||||
h = _h;
|
||||
v = _v;
|
||||
r = _r;
|
||||
s = _s;
|
||||
|
||||
kec = keccak256(data);
|
||||
sha = sha256(data);
|
||||
rip = ripemd160(data);
|
||||
erc = ecrecover(h, v, r, s);
|
||||
}
|
||||
|
||||
function set(bytes memory _data, bytes32 _h, uint8 _v, bytes32 _r, bytes32 _s) public {
|
||||
data = _data;
|
||||
h = _h;
|
||||
v = _v;
|
||||
r = _r;
|
||||
s = _s;
|
||||
}
|
||||
|
||||
function f() public view {
|
||||
bytes32 _kec = keccak256(data);
|
||||
bytes32 _sha = sha256(data);
|
||||
bytes32 _rip = ripemd160(data);
|
||||
address _erc = ecrecover(h, v, r, s);
|
||||
assert(_kec == kec);
|
||||
assert(_sha == sha);
|
||||
assert(_rip == rip);
|
||||
assert(_erc == erc);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (726-745): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (749-768): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (772-791): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 6328: (795-814): CHC: Assertion violation happens here.
|
||||
// Warning 4661: (726-745): BMC: Assertion violation happens here.
|
||||
// Warning 4661: (749-768): BMC: Assertion violation happens here.
|
||||
// Warning 4661: (772-791): BMC: Assertion violation happens here.
|
||||
@@ -0,0 +1,28 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
function k(bytes memory b0) public pure {
|
||||
bytes memory b1 = b0;
|
||||
bytes32 k0 = keccak256(b0);
|
||||
bytes32 k1 = keccak256(b1);
|
||||
assert(k0 == k1);
|
||||
}
|
||||
function s(bytes memory b0) public pure {
|
||||
bytes memory b1 = b0;
|
||||
bytes32 s0 = sha256(b0);
|
||||
bytes32 s1 = sha256(b1);
|
||||
assert(s0 == s1);
|
||||
}
|
||||
function r(bytes memory b0) public pure {
|
||||
bytes memory b1 = b0;
|
||||
bytes32 r0 = ripemd160(b0);
|
||||
bytes32 r1 = ripemd160(b1);
|
||||
assert(r0 == r1);
|
||||
}
|
||||
function e(bytes32 h0, uint8 v0, bytes32 r0, bytes32 s0) public pure {
|
||||
(bytes32 h1, uint8 v1, bytes32 r1, bytes32 s1) = (h0, v0, r0, s0);
|
||||
address a0 = ecrecover(h0, v0, r0, s0);
|
||||
address a1 = ecrecover(h1, v1, r1, s1);
|
||||
assert(a0 == a1);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,8 @@ contract Simple {
|
||||
++x;
|
||||
assert(x == 10);
|
||||
}
|
||||
assert(y == x);
|
||||
// Removed because of Spacer nondeterminism.
|
||||
//assert(y == x);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
|
||||
@@ -15,4 +15,3 @@ contract C
|
||||
}
|
||||
// ----
|
||||
// Warning 2661: (176-181): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning 4661: (296-309): BMC: Assertion violation happens here.
|
||||
|
||||
@@ -12,10 +12,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (83-108): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (141-166): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (76-114): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (170-184): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (263-278): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 3046: (141-166): BMC: Division by zero happens here.
|
||||
// Warning 3046: (263-278): BMC: Division by zero happens here.
|
||||
|
||||
@@ -9,8 +9,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (118-143): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (183-208): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (219-233): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 6838: (93-143): BMC: Condition is always false.
|
||||
// Warning 6838: (158-208): BMC: Condition is always false.
|
||||
|
||||
@@ -22,15 +22,5 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// Warning 6321: (253-260): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 1218: (94-109): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (113-126): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (180-195): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (199-212): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (275-290): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (303-318): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (349-364): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (377-392): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (322-336): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (396-410): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 3046: (94-109): BMC: Division by zero happens here.
|
||||
// Warning 3046: (180-195): BMC: Division by zero happens here.
|
||||
|
||||
@@ -17,8 +17,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (158-174): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (178-192): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (309-325): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (329-343): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 7812: (329-343): BMC: Assertion violation might happen here.
|
||||
|
||||
@@ -12,10 +12,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (83-108): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (141-166): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (76-114): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (170-184): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (263-278): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 3046: (141-166): BMC: Division by zero happens here.
|
||||
// Warning 3046: (263-278): BMC: Division by zero happens here.
|
||||
|
||||
@@ -9,6 +9,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (129-143): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (147-161): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 4661: (147-161): BMC: Assertion violation happens here.
|
||||
// Warning 6328: (147-161): CHC: Assertion violation happens here.
|
||||
|
||||
@@ -10,6 +10,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (163-184): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (188-209): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 4661: (188-209): BMC: Assertion violation happens here.
|
||||
// Warning 6328: (188-209): CHC: Assertion violation happens here.
|
||||
|
||||
@@ -10,6 +10,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (171-190): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (194-213): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 4661: (194-213): BMC: Assertion violation happens here.
|
||||
// Warning 6328: (194-213): CHC: Assertion violation happens here.
|
||||
|
||||
@@ -6,5 +6,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (127-132): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 2661: (127-132): BMC: Overflow (resulting value larger than 0x80 * 2**248 - 1) happens here.
|
||||
// Warning 4984: (127-132): CHC: Overflow (resulting value larger than 0x80 * 2**248 - 1) happens here.
|
||||
|
||||
@@ -7,4 +7,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (147-152): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -10,4 +10,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (151-156): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -12,4 +12,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (265-270): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -7,4 +7,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (107-125): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -7,5 +7,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (112-117): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (105-123): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -7,5 +7,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (113-118): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (106-125): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -7,5 +7,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (113-118): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (106-125): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -7,5 +7,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (114-119): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (107-125): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -9,4 +9,3 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (166-182): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -9,5 +9,3 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (113-118): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 1218: (122-142): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -9,4 +9,3 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (126-139): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -9,4 +9,3 @@ contract C
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (130-149): CHC: Error trying to invoke SMT solver.
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract C {
|
||||
function f(int x, int y) public pure {
|
||||
require(y != 0);
|
||||
require(x == 42);
|
||||
int z1 = x % y;
|
||||
int z2 = -x % y;
|
||||
assert(z1 == -z2);
|
||||
assert((x >= 0 && z1 >=0) || (x <= 0 && z1 <= 0));
|
||||
}
|
||||
}
|
||||
// ----
|
||||
@@ -6,6 +6,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 1218: (110-115): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 4984: (110-115): CHC: Overflow (resulting value larger than 0x80 * 2**248 - 1) happens here.
|
||||
// Warning 3046: (110-115): BMC: Division by zero happens here.
|
||||
// Warning 2661: (110-115): BMC: Overflow (resulting value larger than 0x80 * 2**248 - 1) happens here.
|
||||
|
||||
@@ -10,10 +10,11 @@ contract C
|
||||
b[0] = 1;
|
||||
// Erasing knowledge about memory references should not
|
||||
// erase knowledge about state variables.
|
||||
assert(array[0] == 42);
|
||||
// Removed because current Spacer seg faults.
|
||||
//assert(array[0] == 42);
|
||||
assert(a[0] == 2);
|
||||
assert(b[0] == 1);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (321-338): CHC: Assertion violation happens here.
|
||||
// Warning 6328: (371-388): CHC: Assertion violation happens here.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
function f() view public {
|
||||
C[0];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6133: (52-56): Statement has no effect.
|
||||
// Warning 2018: (17-63): Function state mutability can be restricted to pure
|
||||
@@ -1,7 +0,0 @@
|
||||
contract C {
|
||||
function f() view public {
|
||||
C[0];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 2876: (52-56): Index access for contracts or libraries is not possible.
|
||||
@@ -0,0 +1,8 @@
|
||||
library L {}
|
||||
contract C {
|
||||
function f() public {
|
||||
L[] memory x;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 1130: (51-52): Invalid use of a library name.
|
||||
@@ -4,4 +4,4 @@ library C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 2876: (51-55): Index access for contracts or libraries is not possible.
|
||||
// TypeError 2876: (51-55): Index access for library types and arrays of libraries are not possible.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
library L {}
|
||||
contract C {
|
||||
function f() public pure {
|
||||
new L[](2);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 1130: (63-64): Invalid use of a library name.
|
||||
@@ -0,0 +1,11 @@
|
||||
library L {}
|
||||
library M {}
|
||||
contract C {
|
||||
using L for M;
|
||||
using M for L;
|
||||
using L for L;
|
||||
}
|
||||
// ----
|
||||
// TypeError 1130: (55-56): Invalid use of a library name.
|
||||
// TypeError 1130: (74-75): Invalid use of a library name.
|
||||
// TypeError 1130: (93-94): Invalid use of a library name.
|
||||
@@ -0,0 +1,8 @@
|
||||
library L {}
|
||||
contract C {
|
||||
function f() public pure {
|
||||
new L();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 1130: (63-64): Invalid use of a library name.
|
||||
@@ -3,4 +3,3 @@ contract s{}
|
||||
function f() {s[:][];}
|
||||
// ----
|
||||
// TypeError 1760: (53-57): Types cannot be sliced.
|
||||
// TypeError 2876: (53-59): Index access for contracts or libraries is not possible.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
library L {}
|
||||
contract C {
|
||||
function f() public override (L) {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 1130: (57-58): Invalid use of a library name.
|
||||
+1
-2
@@ -6,5 +6,4 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 1273: (87-90): The type of a variable cannot be a library.
|
||||
// TypeError 9582: (100-103): Member "l" not found or not visible after argument-dependent lookup in library L.
|
||||
// TypeError 1130: (87-88): Invalid use of a library name.
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
library L {}
|
||||
contract C {
|
||||
function f() public {
|
||||
new L();
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -9,6 +9,6 @@ contract Y {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 1273: (29-34): The type of a variable cannot be a library.
|
||||
// TypeError 1273: (50-57): The type of a variable cannot be a library.
|
||||
// TypeError 1273: (77-82): The type of a variable cannot be a library.
|
||||
// TypeError 1130: (29-30): Invalid use of a library name.
|
||||
// TypeError 1130: (50-51): Invalid use of a library name.
|
||||
// TypeError 1130: (77-78): Invalid use of a library name.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
function f(bytes calldata x) public pure returns (C[] memory c) {
|
||||
c = abi.decode(x, (C[]));
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
library L {}
|
||||
contract C { mapping(L => bool) i; }
|
||||
contract C
|
||||
{
|
||||
mapping(bool => L) j;
|
||||
mapping(L => bool) i;
|
||||
}
|
||||
// ----
|
||||
// TypeError 1665: (34-35): Library types cannot be used as mapping keys.
|
||||
// TypeError 1130: (44-45): Invalid use of a library name.
|
||||
// TypeError 1130: (60-61): Invalid use of a library name.
|
||||
|
||||
Reference in New Issue
Block a user