I am having problems with the avr target that has address space support for
memories that only support post-increment addressing.

However, the code runs on a bad assertion because cprop.c generates silly insn
notes:


cprop.c:try_replace_reg()

      if (!rtx_equal_p (src, SET_SRC (set))
          && validate_change (insn, &SET_SRC (set), src, 0))
        success = 1;

      /* If we've failed perform the replacement, have a single SET to
         a REG destination and don't yet have a note, add a REG_EQUAL note
         to not lose information.  */
      if (!success && note == 0 && set != 0 && REG_P (SET_DEST (set)))
        note = set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src));
    }

In the case in question validate_change returns false (which is correct) but
then there is a really strange note created:

src=
(mem/v/c:HI (post_inc:HI (const:HI (plus:HI (symbol_ref:HI ("V") [flags 0x402]
 <var_decl 0xb7ce8720 V>)
                (const_int 1 [0x1])))) [3 V.i2+0 S2 A8 AS2])

insn =
(insn 10 9 11 2 (set (reg:HI 42 [ D.1334 ])
        (mem/v/c:HI (post_inc:HI (reg:HI 30 r30)) [3 V.i2+0 S2 A8 AS2]))
as1.c:25 22 {*movhi}
     (expr_list:REG_UNUSED (reg:HI 30 r30)
        (nil)))

This leads to a call of emit_rtl.c:set_unique_reg_note() with datum=src
-> df_notes_rescan
-> df_uses_record
-> df_uses_record
-> df_ref_record


static void
df_ref_record (...)
{
  unsigned int regno;

  gcc_checking_assert (REG_P (reg) || GET_CODE (reg) == SUBREG);

reg=
(const:HI (plus:HI (symbol_ref:HI ("V") [flags 0x402]  <var_decl 0xb7ce8720 V>)
        (const_int 1 [0x1])))


and this runs into ICE, of course.

Any ideas?

Johann

Reply via email to