Skip to content
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

Commit ada9e41

Browse files
Missed adding the type cast to avoid the overflow
1 parent af1524f commit ada9e41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

c/nla-digbench/prod4br-ll.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int main() {
3030
q = 0;
3131

3232
while (1) {
33-
__VERIFIER_assert(q + a * b * p == x * y);
33+
__VERIFIER_assert(q + a * b * p == (long long) x * y);
3434

3535
if (!(a != 0 && b != 0))
3636
break;
@@ -52,7 +52,7 @@ int main() {
5252
}
5353
}
5454

55-
__VERIFIER_assert(q == x * y);
55+
__VERIFIER_assert(q == (long long) x * y);
5656
__VERIFIER_assert(a * b == 0);
5757
return 0;
5858
}

0 commit comments

Comments
 (0)