2020-09-01 09:35:25 +00:00
|
|
|
contract C {
|
|
|
|
function f() public pure {
|
|
|
|
assert(~1 | (~0xff & 0) == -2);
|
|
|
|
int x = ~1 | (~0xff ^ 0);
|
|
|
|
/// Result is negative, assertion fails.
|
|
|
|
assert(x > 0);
|
|
|
|
int y = ~x | (0xff & 1);
|
|
|
|
assert(y > 0);
|
|
|
|
assert(y & (0xffffffffffffffffff & 1) == 1);
|
|
|
|
}
|
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2020-09-01 09:35:25 +00:00
|
|
|
// ----
|
2023-02-09 16:07:13 +00:00
|
|
|
// Warning 6328: (148-161): CHC: Assertion violation happens here.
|
|
|
|
// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
|