Fix ICE on multi-source use of abi.*

This commit is contained in:
Leo Alt
2021-08-27 18:55:36 +02:00
parent ab6b430c1f
commit 60b866f9d8
10 changed files with 74 additions and 46 deletions
@@ -0,0 +1,9 @@
==== Source: s1.sol ====
function f() {
ecrecover("1234", 1, "0", abi.decode("", (bytes2)));
}
==== Source: s2.sol ====
contract C {}
// ----
// Warning 6133: (s1.sol:16-67): Statement has no effect.
// Warning 2018: (s1.sol:0-70): Function state mutability can be restricted to pure
@@ -0,0 +1,9 @@
==== Source: s1.sol ====
function f() {
ecrecover("", 1, "", "");
}
==== Source: s2.sol ====
contract C {}
// ----
// Warning 6133: (s1.sol:16-40): Statement has no effect.
// Warning 2018: (s1.sol:0-43): Function state mutability can be restricted to pure
@@ -0,0 +1,12 @@
==== Source: l.sol ====
library L {
int constant one = 1;
function f() internal {
one;
}
}
==== Source: s1.sol ====
library L {}
// ----
// Warning 6133: (l.sol:62-65): Statement has no effect.
// Warning 2018: (l.sol:36-69): Function state mutability can be restricted to pure
@@ -3,5 +3,6 @@ contract C {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
// Warning 6328: (50-64): CHC: Assertion violation happens here.\nCounterexample:\n\na = 0\n\nTransaction trace:\nC.constructor()\nC.f(0)
// Warning 6328: (50-64): CHC: Assertion violation happens here.