[Bug c++/35730] ICE on valid code convert_move expr.c:373
davids at webmaster dot com
gcc-bugzilla@gcc.gnu.org
Fri Mar 28 09:25:00 GMT 2008
------- Comment #1 from davids at webmaster dot com 2008-03-28 09:24 -------
#include <string.h>
int moo(void)
{
unsigned char msg1[] = { 0, 0 };
unsigned char msg2[] = { 0, 0 };
memcpy(msg1, msg2, 2);
return memcmp(msg1, msg2, 2) != 0;
}
With this code, changing the sizes in both memcpy and memcmp from '2' to '1'
makes the problem go away. So does changing both arrays from '{ 0, 0 }' to { 0,
0, 0 }'. So maybe it's an off-by-one?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35730
More information about the Gcc-bugs
mailing list