profiledbootstrap currently fails on i386, with --enable-checking=release rtl.c (copy_rtx) is miscompiled (after giving a bogus warning that copy is uninitialized (well, in the generated code it is), with checking it ICEs: ../../gcc/rtl.c: In function ‘copy_rtx’: ../../gcc/rtl.c:236:1: error: SSA_NAME_DEF_STMT is wrong Expected definition statement: # .MEM_93 = VDEF <.MEM_91> D.27976_89 = memcpy (copy.26_86, orig.25_85, 12); Actual definition statement: # .MEM_92 = VDEF <.MEM_91> D.27976_89 = memcpy (copy.26_86, orig.25_85, D.27973_83); ../../gcc/rtl.c:236:1: internal compiler error: verify_ssa failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. This is caused by a bug in gimple_stringop_fixed_value where it doesn't handle lhs properly. Small testcase: char buf[64]; char buf2[64]; void * foo (char *p, long size) { return __builtin_memcpy (buf, p, size); } int main (void) { long i; for (i = 0; i < 65536; i++) if (foo ("abcdefghijkl", 12) != buf) __builtin_abort (); if (foo (buf2, 64) != buf) __builtin_abort (); return 0; } ./xgcc -B ./ -O2 -fprofile-generate test.c -o test ./test ./xgcc -B ./ -O2 -fprofile-use test.c -o test
I'll take care of it.
Created attachment 22911 [details] gcc46-pr47187.patch Very lightly tested fix.
Author: jakub Date: Fri Jan 7 18:39:11 2011 New Revision: 168581 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168581 Log: PR bootstrap/47187 * value-prof.c (gimple_stringop_fixed_value): Handle lhs of the call properly. * gcc.dg/tree-prof/pr47187.c: New test. Added: trunk/gcc/testsuite/gcc.dg/tree-prof/pr47187.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/value-prof.c
Fixed.