Skip to content

Commit 74b1f52

Browse files
committed
Fix copy&paste error: check_long_long should check __builtin_ssubll_overflow
The constants are of the right type, but __builtin_ssubl_overflow was used instead of __builtin_ssubll_overflow (which, however, made no difference on 64-bit Linux platforms, which most of our tests run on).
1 parent 0c93bc1 commit 74b1f52

File tree

1 file changed

+3
-3
lines changed
  • regression/cbmc/gcc_builtin_sub_overflow

1 file changed

+3
-3
lines changed

regression/cbmc/gcc_builtin_sub_overflow/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ void check_long(void)
2626
void check_long_long(void)
2727
{
2828
long result;
29-
assert(!__builtin_ssubl_overflow(1ll, 1ll, &result));
29+
assert(!__builtin_ssubll_overflow(1ll, 1ll, &result));
3030
assert(result == 0ll);
31-
assert(__builtin_ssubl_overflow(LLONG_MIN, 1ll, &result));
32-
assert(!__builtin_ssubl_overflow(LLONG_MIN / 2ll, LLONG_MAX / 2ll, &result));
31+
assert(__builtin_ssubll_overflow(LLONG_MIN, 1ll, &result));
32+
assert(!__builtin_ssubll_overflow(LLONG_MIN / 2ll, LLONG_MAX / 2ll, &result));
3333
assert(result - 1ll == LLONG_MIN);
3434
assert(0 && "reachability");
3535
}

0 commit comments

Comments
 (0)