solidity/test/libsolidity/smtCheckerTests/operators/division_5.sol

14 lines
262 B
Solidity
Raw Normal View History

2019-12-04 12:11:13 +00:00
pragma experimental SMTChecker;
contract C {
2020-12-16 17:32:34 +00:00
function mul(uint8 a, uint8 b) internal pure returns (uint8) {
uint8 c;
2019-12-04 12:11:13 +00:00
if (a != 0) {
c = a * b;
require(c / a == b);
}
return c;
}
}
2020-08-11 13:53:24 +00:00
// ----
2020-12-16 17:32:34 +00:00
// Warning 6838: (161-171): BMC: Condition is always true.