https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114753
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #1) > With __val = 9223372036854775808LL __sign = -1LL Oops, that should be __val = 9223372036854775808ULL and __sign = -1 i.e. int main() { unsigned long long val = 9223372036854775808ULL; int sign = -1; long long res; return __builtin_mul_overflow(val, sign, &res); } This shouldn't trap.