Michael Eager <[EMAIL PROTECTED]> writes:

> I'm trying to understand an assertion failure in reload1.c:8135.
> 
> In delete_output_reload(), I'm getting an assertion failure
> in this code:
> 
>    for (i1 = reg_equiv_alt_mem_list [REGNO (reg)]; i1; i1 = XEXP (i1, 1))
>      {
>        gcc_assert (!rtx_equal_p (XEXP (i1, 0), substed));
>        n_occurrences += count_occurrences (PATTERN (insn), XEXP (i1, 0), 0);
>      }
> 
> Sure enough, i1 matches substed.
> 
> reg_equiv_memory_loc[regno] (the source for substed) is the same as
> reg_equiv_alt_mem_list[regno].
> 
> Why is this unexpected and what might cause it?

It's unexpected because you shouldn't see the same memory location in
reg_equiv_memory_loc and req_equiv_alt_mem_list.  The memory location
which holds the value should not also be an alternate location for the
value.

The check is there because if they are equal for some reason we will
miscount occurrences.  We already counted occurrences in SUBSTED.

I realize that this is probably not very helpful.

In case it helps, this is where reg_equiv_alt_mem came in:

http://gcc.gnu.org/ml/gcc-patches/2006-07/msg01136.html
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00070.html

Ian

Reply via email to