------- Comment #3 from zsojka at seznam dot cz  2010-05-17 18:45 -------
Stil appears in r159500, x86_64-linux.

Uninitialised read is at gcc/haifa-sched.c:1589, more exactly it is read of
BLOCK_FOR_INSN (insn)

When gcc/haifa-sched.c:1589 is changed to:
insn != NULL_RTX && (printf("%p %p\n", (void *)BLOCK_FOR_INSN (insn), (void
*)BLOCK_FOR_INSN (after)), BLOCK_FOR_INSN (insn) == BLOCK_FOR_INSN (after));

it outputs (for original testcase):
$ /mnt/sda1/build-159500-test/gcc/cc1 -fschedule-insns -fsched-pressure
testcase.c -quiet
0x7fcc29e98270 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0xafafafafafafafaf 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0xafafafafafafafaf 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0x7fcc29e98270 0x7fcc29e98270
0xafafafafafafafaf 0x7fcc29e98270

However, I wasn't able to cause any difference in generated code even for more
complex testcases, when the condition is "true" for "BLOCK_FOR_INSN (insn) ==
0xafafafafafafafaf" - that is, the uninitialised value is the same as
BLOCK_FOR_INSN (after) "by luck".


-- 


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

Reply via email to