2021-04-08 19:41:35 +00:00
|
|
|
==== Source: A ====
|
|
|
|
struct S { uint x; }
|
|
|
|
function set(S storage a, uint v) { a.x = v; }
|
|
|
|
|
|
|
|
==== Source: B ====
|
|
|
|
import "A";
|
|
|
|
import "A" as A;
|
|
|
|
contract C {
|
|
|
|
A.S data;
|
|
|
|
function f(uint v) internal returns (uint one, uint two) {
|
|
|
|
A.set(data, v);
|
|
|
|
one = data.x;
|
|
|
|
set(data, v + 1);
|
|
|
|
two = data.x;
|
|
|
|
}
|
|
|
|
function g() public {
|
|
|
|
(uint x, uint y) = f(7);
|
|
|
|
assert(x == 7); // should hold but the SMTChecker doesn't know that
|
|
|
|
assert(y == 8); // should hold but the SMTChecker doesn't know that
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2022-01-12 17:42:40 +00:00
|
|
|
// SMTIgnoreCex: yes
|
2021-04-08 19:41:35 +00:00
|
|
|
// ----
|
2022-01-12 17:42:40 +00:00
|
|
|
// Warning 6328: (B:238-252): CHC: Assertion violation happens here.
|
|
|
|
// Warning 6328: (B:308-322): CHC: Assertion violation happens here.
|