2018-08-01 21:37:46 +00:00
|
|
|
// Check that variables are cleared
|
|
|
|
contract C {
|
|
|
|
function f(uint x) public pure {
|
|
|
|
x = 2;
|
|
|
|
while (x > 1) {
|
2018-11-09 17:50:06 +00:00
|
|
|
x = 1;
|
2018-08-01 21:37:46 +00:00
|
|
|
}
|
|
|
|
assert(x == 2);
|
|
|
|
}
|
|
|
|
}
|
2019-12-04 15:39:34 +00:00
|
|
|
// ====
|
2021-03-31 15:11:54 +00:00
|
|
|
// SMTEngine: all
|
2019-12-04 15:39:34 +00:00
|
|
|
// SMTSolvers: z3
|
2023-07-24 16:33:43 +00:00
|
|
|
// SMTIgnoreCex: no
|
2018-08-01 21:37:46 +00:00
|
|
|
// ----
|
2021-03-31 15:11:54 +00:00
|
|
|
// Warning 6328: (162-176): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 1\n\nTransaction trace:\nC.constructor()\nC.f(0)
|