------- Comment #5 from zsojka at seznam dot cz  2009-11-17 18:34 -------
Created an attachment (id=19029)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19029&action=view)
reduced testcase

BINARY=/mnt/svn/gcc-trunk/binary-154190-lto/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1

valgrind --malloc-fill=0x00 $BINARY -O1 -fgcse-sm -fPIC -m32 -o malloc-00.S
pr41862.i
valgrind --malloc-fill=0xff $BINARY -O1 -fgcse-sm -fPIC -m32 -o malloc-ff.S
pr41862.i
diff malloc-00.S malloc-ff.S

Gives:
13a14
>       movl    %esi, g...@gotoff(%ebx)
21,22c22,23
<       leal    1(%esi), %eax
<       movl    %eax, g...@gotoff(%ebx)
---
>       addl    $1, %esi
>       movl    %esi, g...@gotoff(%ebx)

The first store is redundant, caused by using uninitialised memory by gcc.


-- 

zsojka at seznam dot cz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18928|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41862

Reply via email to