https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66247
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |mpolacek at gcc dot gnu.org Resolution|--- |INVALID --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- The code has undefined behavior: ../../../../gcc-5.1.0/gmp/tests/mpz/t-scan.c:84:27: runtime error: index 6 out of bounds for type 'const int [6]' I believe here for (oindex = 0; oindex <= (int) (sizeof (offset) / sizeof ((offset)[0])); oindex++) you need to change <= to <.