https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91555
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- t5.c:754:7: runtime error: signed integer overflow: 4611686018427387904 * 2 cannot be represented in type 'long int' This loop where the problem shows up: lo = 1; for (i = 0; i < (int) TYPE_BIT(time_t) - 1; ++i) lo *= 2; hi = -(lo + 1); Changing it to: unsigned long long lo1 = 1; for (i = 0; i < (int) TYPE_BIT(time_t) - 1; ++i) lo1 *= 2; hi = -(lo1 + 1); lo = lo1; Fixes the problem.