[Bug rtl-optimization/41862] valgrind warns about using uninitialized variable with -fgcse-sm
zsojka at seznam dot cz
gcc-bugzilla@gcc.gnu.org
Tue Nov 17 18:34:00 GMT 2009
------- 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, gm@GOTOFF(%ebx)
21,22c22,23
< leal 1(%esi), %eax
< movl %eax, gm@GOTOFF(%ebx)
---
> addl $1, %esi
> movl %esi, gm@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
More information about the Gcc-bugs
mailing list