solidity/test/libsolidity/smtCheckerTests/loops/do_while_break_2_fail.sol

23 lines
389 B
Solidity
Raw Normal View History

pragma experimental SMTChecker;
contract C {
function f() public pure {
uint a = 0;
while (true) {
do {
break;
a = 2;
} while (true);
a = 1;
break;
}
assert(a == 2);
}
}
// ====
// SMTSolvers: z3
// ----
// Warning 5740: (128-133): Unreachable code.
// Warning 5740: (147-151): Unreachable code.
2020-09-09 14:12:55 +00:00
// Warning 6328: (180-194): Assertion violation happens here.