------- Comment #1 from kkojima at gcc dot gnu dot org 2010-04-13 01:40 ------- Created an attachment (id=20375) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20375&action=view) A reduced test case
It fails also on sh-elf with -m4 -O -funroll-loops. I've confirmed that the patch below can fix the failure, though I'm not sure that this is the right thing to do. -- * web.c (union_match_dups): Call FUN only if *REF is non null. diff -up ORIG/trunk/gcc/web.c trunk/gcc/web.c --- ORIG/trunk/gcc/web.c 2010-04-12 09:52:37.000000000 +0900 +++ trunk/gcc/web.c 2010-04-12 11:14:13.000000000 +0900 @@ -123,7 +123,8 @@ union_match_dups (rtx insn, struct web_e if (DF_REF_LOC (*ref) == recog_data.operand_loc[op]) break; - (*fun) (use_entry + DF_REF_ID (*dupref), entry + DF_REF_ID (*ref)); + if (*ref != NULL) + (*fun) (use_entry + DF_REF_ID (*dupref), entry + DF_REF_ID (*ref)); } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43742