------- Comment #4 from mikpe at it dot uu dot se 2010-08-03 21:12 ------- Created an attachment (id=21381) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21381&action=view) reduced test case
Here is a 66-line test case, reduced from Ramana's preprocessed source, that reliably fails -fcompare-debug when compiled by a gcc-4.6-20100731 cross to armv5tel-linux-gnueabi hosted on i686-linux. Diffing the disassembled object code for -g0 and -g shows: @@ -1,5 +1,5 @@ -pr45162.o.g0: file format elf32-littlearm +pr45162.o.g: file format elf32-littlearm Disassembly of section .text: @@ -57,6 +57,7 @@ c4: e1943005 orrs r3, r4, r5 c8: e1a00007 mov r0, r7 cc: 01a04008 moveq r4, r8 - d0: ebfffffe bl 0 <vinfo_for_stmt> - d4: e5804004 str r4, [r0, #4] - d8: eaffffd0 b 20 <vinfo_for_stmt+0x20> + d0: 03a05000 moveq r5, #0 ; 0x0 + d4: ebfffffe bl 0 <vinfo_for_stmt> + d8: e5804004 str r4, [r0, #4] + dc: eaffffcf b 20 <vinfo_for_stmt+0x20> My cross was configured: /tmp/gcc-4.6-20100731/configure --target=armv5tel-unknown-linux-gnueabi --with-arch=armv5te --with-tune=xscale --prefix=/home/mikpe/pkgs/linux-x86/cross-armv5tel --with-gmp=/home/mikpe/pkgs/linux-x86/gmp-4.3.2 --with-mpfr=/home/mikpe/pkgs/linux-x86/mpfr-2.4.2 --with-mpc=/home/mikpe/pkgs/linux-x86/mpc-0.8.2 --disable-plugin --disable-lto --disable-nls --disable-shared --disable-libmudflap --disable-multilib --enable-threads=posix --enable-checking=release --enable-languages=c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45162