The following code produces an ICE with GCC-4.3.0 when compiled with g++ and -O. Removing -O or using gcc removes the ICE.
#include <string.h> int moo(void) { unsigned char msg[] = { 0, 0 }; unsigned char data[2]; memcpy(data, msg, sizeof (msg)); return memcmp(data, msg, sizeof (data)) != 0; } Also, changing msg's declaration from "msg[]" to "msg[2]" avoids the ICE. g++430 test.c -c -O test.c: In function 'int moo()': test.c:6: internal compiler error: in convert_move, at expr.c:373 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions Using gcc430, g++423, or g++412, the code compiles fine. Of the builds I tested, only g++ 4.3.0 has the problem. -- Summary: ICE on valid code convert_move expr.c:373 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: davids at webmaster dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35730