diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 624aa13e1cb..ff158440aed 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-01-23 Richard Henderson + + * expr.c (move_by_pieces_1): Extend size before negation. + 2002-01-23 Bob Wilson * config/xtensa/elf.h: New file. diff --git a/gcc/expr.c b/gcc/expr.c index bad461ef066..06914206ae7 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1575,9 +1575,11 @@ move_by_pieces_1 (genfun, mode, data) from1 = adjust_address (data->from, mode, data->offset); if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0) - emit_insn (gen_add2_insn (data->to_addr, GEN_INT (-size))); + emit_insn (gen_add2_insn (data->to_addr, + GEN_INT (-(HOST_WIDE_INT)size))); if (HAVE_PRE_DECREMENT && data->explicit_inc_from < 0) - emit_insn (gen_add2_insn (data->from_addr, GEN_INT (-size))); + emit_insn (gen_add2_insn (data->from_addr, + GEN_INT (-(HOST_WIDE_INT)size))); if (data->to) emit_insn ((*genfun) (to1, from1));