mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
27 lines
715 B
Solidity
27 lines
715 B
Solidity
pragma experimental SMTChecker;
|
|
|
|
contract C {
|
|
function f(uint256 d) public pure {
|
|
uint x = addmod(1, 2, d);
|
|
assert(x < d);
|
|
}
|
|
|
|
function g(uint256 d) public pure {
|
|
uint x = mulmod(1, 2, d);
|
|
assert(x < d);
|
|
}
|
|
|
|
function h() public pure returns (uint256) {
|
|
uint x = mulmod(0, 1, 2);
|
|
uint y = mulmod(1, 0, 2);
|
|
assert(x == y);
|
|
uint z = addmod(0, 1, 2);
|
|
uint t = addmod(1, 0, 2);
|
|
assert(z == t);
|
|
}
|
|
}
|
|
// ----
|
|
// Warning 6321: (253-260): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
|
// Warning 3046: (94-109): BMC: Division by zero happens here.
|
|
// Warning 3046: (180-195): BMC: Division by zero happens here.
|