2020-11-24 18:14:15 +00:00
|
|
|
contract C {
|
2020-12-29 10:53:35 +00:00
|
|
|
function f() public pure {
|
|
|
|
bytes memory y = "def";
|
|
|
|
y[0] &= "d";
|
|
|
|
assert(y[0] == "d");
|
2020-11-24 18:14:15 +00:00
|
|
|
|
2020-12-29 10:53:35 +00:00
|
|
|
y[0] |= "e";
|
|
|
|
assert(y[0] == "d"); // fails
|
2020-11-24 18:14:15 +00:00
|
|
|
|
2020-12-29 10:53:35 +00:00
|
|
|
y[0] ^= "f";
|
|
|
|
// Disabled because of nondeterminism in Spacer in Z3 4.8.9
|
|
|
|
//assert(y[0] == (bytes1("d") | bytes1("e")) ^ bytes1("f"));
|
|
|
|
}
|
2020-11-24 18:14:15 +00:00
|
|
|
}
|
2020-12-18 18:10:32 +00:00
|
|
|
// ====
|
2021-03-31 15:11:54 +00:00
|
|
|
// SMTEngine: all
|
2020-12-18 18:10:32 +00:00
|
|
|
// SMTIgnoreCex: yes
|
2020-11-24 18:14:15 +00:00
|
|
|
// ----
|
2021-03-31 15:11:54 +00:00
|
|
|
// Warning 6328: (123-142): CHC: Assertion violation happens here.
|