From 4c9034c5e50f63d501f0c170852957d6251e72b6 Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Sat, 10 Feb 2007 06:47:49 +0000 Subject: [PATCH] re PR rtl-optimization/29599 (ICE when building the kernel on SH4) PR rtl-optimization/29599 * reload1.c (eliminate_regs_in_insn): Take the destination mode into account when computing the offset. From-SVN: r121792 --- gcc/ChangeLog | 6 ++++++ gcc/reload1.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 05fac8a48a2..584726dbebe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-02-10 Kaz Kojima + + PR rtl-optimization/29599 + * reload1.c (eliminate_regs_in_insn): Take the destination + mode into account when computing the offset. + 2007-02-09 Stuart Hastings Richard Henderson diff --git a/gcc/reload1.c b/gcc/reload1.c index 5598b7afdba..01e0657a448 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1,7 +1,7 @@ /* Reload pseudo regs into hard regs for insns that require hard regs. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, - Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. This file is part of GCC. @@ -3100,6 +3100,7 @@ eliminate_regs_in_insn (rtx insn, int replace) { rtx to_rtx = ep->to_rtx; offset += ep->offset; + offset = trunc_int_for_mode (offset, GET_MODE (reg)); if (GET_CODE (XEXP (plus_cst_src, 0)) == SUBREG) to_rtx = gen_lowpart (GET_MODE (XEXP (plus_cst_src, 0)), -- 2.30.2