The entire build logs are available at: http://arm.koji.fedoraproject.org/koji/getfile?taskID=72888&name=build.log This uses the Fedora gcc rpm 4.4.1-16 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 18785 [details] The pre-processed sources files generated by gcc Including the pre-processed sources file generated by gcc.
Bugs regarding redhat/gcc-4_*-branch should be filed into bugzilla.redhat.com, not here. That said, 4.4.1-16 is quite old, first try the latest one.
/* { 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; } fails on the current trunk the same way, at least in the x86_64-linux -> armv5tel-unknown-linux-gnueabi cross.
For: (insn 78 77 16 2 rh528639.i:12 (cond_exec (eq (reg:CC 24 cc) (const_int 0 [0x0])) (set (reg:SI 0 r0 [orig:133 iftmp.0 ] [133]) (reg:SI 4 r4))) 2367 {neon_vornv2di+77} (expr_list:REG_DEAD (reg:CC 24 cc) (nil))) we have MO_VAL_SET with (concat/v (concat:SI (value/s/u:SI 23753 @0x121b8f0/0x11da460) (reg:SI 0 r0 [orig:133 iftmp.0 ] [133])) (set (reg:QI 0 r0 [ iftmp.0 ]) (reg:QI 4 r4))) The QImode comes from the realdecl being tracked being actually QImode, so var_lowpart is called on the SET_SRC. VAL_NEEDS_RESOLUTION is true, so val_resolve (out, val, SET_SRC (uloc), insn); is called which sets a QImode r4 as one of the locations for the VALUE:SI 23753. Then 5309 val_store (out, val, vloc, insn); is called, and vloc here is SImode, so we have non-matching modes. Not sure where the bug is, maybe vloc should be QImode as well in that case and var_lowpart wasn't being called somewhere... BTW, I wonder how well var-tracking.c handles COND_EXEC, I don't see it ever mentioned in var-tracking.c, so I assume it handles all the stores as unconditional.
Testcase in Comment #3 fails with -march=armv5te on arm-eabi cross on an x86_64-linux-gnu host with trunk.
http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00992.html http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01218.html needs review...
Applied the three patches. These DO fix the issue mentioned above. Is it safe to continue using these patches in gcc until the next stable release arrives?
Subject: Bug 41679 Author: jakub Date: Thu Dec 17 19:30:58 2009 New Revision: 155322 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155322 Log: PR debug/41679 * var-tracking.c (add_stores): Avoid value mode mismatch for promoted declarations. * gcc.target/arm/pr41679.c: New. Added: trunk/gcc/testsuite/gcc.target/arm/pr41679.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/var-tracking.c
Subject: Bug 41679 Author: jakub Date: Thu Dec 17 19:31:52 2009 New Revision: 155323 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155323 Log: PR debug/41679 * var-tracking.c (use_type): Remove indirection from loc. (count_uses): Dereference incoming loc early. (add_uses): Dereference incoming loc early. Modified: trunk/gcc/ChangeLog trunk/gcc/var-tracking.c
Subject: Bug 41679 Author: jakub Date: Thu Dec 17 19:32:32 2009 New Revision: 155324 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155324 Log: PR debug/41679 * var-tracking.c (count_uses): Count MO_VAL_USE of original MO_VAL_SET value for COND_EXEC. (add_stores): Handle conditional stores. Modified: trunk/gcc/ChangeLog trunk/gcc/var-tracking.c
Fixed.