Host/Build/Target Triple: armv5tel-redhat-linux-gnueabi with gcc version: gcc-4.4.1-21 Complete build logs: http://arm.koji.fedoraproject.org/koji/getfile?taskID=73218&name=build.log Initially I thought this to be the same as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41252. But the gcc sources already had the patch indicated in that bug (http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151437)
Created attachment 364554 [details] auto-generated pre-compiled sources auto-generated pre-compiled sources
Can't reproduce this with redhat/gcc-4_4-branch and a cross compiler. So, please try gcc-4.4.2-4.fc12.
Re-opening this bug. It is still seen with gcc-4.4.2-5.fc12 Failure build log: http://arm.koji.fedoraproject.org/koji/getfile?taskID=73937&name=build.log&offset=-2000 Would it be rather better to reopen this bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41679 Although the bug is in the Fedora branch, some gcc-arm folks might at least *suggest* some fixes/tweaks etc. over there
Sorry, still can't reproduce, so there is hardly anything I can do about it. You could try to build just first stage of gcc on arm (configure with --disable-bootstrap in addition to the options gcc.spec passes to configure), see if even the first stage reproduces it. If not, this might be miscompilation of gcc itself.
Actually, after hand editting auto-host.h quite a bit to more match the native one and what I guess arm gas provides I've managed to reproduce it. Looking into it.
Smaller testcase: /* { dg-do compile } */ /* { dg-options "-march=armv5te -g -O2" } */ extern int a; extern char b; extern int foo (void); void test (void) { int c; b = foo () ? '~' : '\0'; while ((c = foo ())) if (c == '7') a = 0; }