[Bug c/66247] make check-gmp fails for gcc-5.1.0
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 21 16:22:00 GMT 2015
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 <.
More information about the Gcc-bugs
mailing list