2020-08-31 15:16:36 +00:00
|
|
|
contract C {
|
|
|
|
uint[] a;
|
2021-03-23 18:15:14 +00:00
|
|
|
constructor() {
|
|
|
|
a.push();
|
|
|
|
a.push();
|
|
|
|
a.push();
|
|
|
|
a.push();
|
|
|
|
}
|
|
|
|
// Accesses are safe but oob is reported due to aliasing.
|
2020-08-31 15:16:36 +00:00
|
|
|
function h() internal returns (uint[] storage) {
|
|
|
|
if (a[2] == 0)
|
|
|
|
a[2] = 3;
|
|
|
|
return a;
|
|
|
|
}
|
|
|
|
function g() public {
|
2021-08-23 09:30:12 +00:00
|
|
|
// Disabled because of Spacer nondeterminism.
|
|
|
|
//h()[2] = 4;
|
2020-08-31 15:16:36 +00:00
|
|
|
assert(h()[2] == 3);
|
|
|
|
}
|
|
|
|
}
|
2020-12-02 17:40:48 +00:00
|
|
|
// ====
|
2021-03-31 15:11:54 +00:00
|
|
|
// SMTEngine: all
|
2020-12-02 17:40:48 +00:00
|
|
|
// SMTIgnoreCex: yes
|
2023-03-28 12:36:56 +00:00
|
|
|
// SMTIgnoreOS: macos
|
2020-08-31 15:16:36 +00:00
|
|
|
// ----
|
2021-08-23 09:30:12 +00:00
|
|
|
// Warning 6328: (335-354): CHC: Assertion violation might happen here.
|
2023-02-09 16:07:13 +00:00
|
|
|
// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
|
2021-08-23 09:30:12 +00:00
|
|
|
// Warning 4661: (335-354): BMC: Assertion violation happens here.
|