summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@gcc.gnu.org>2007-02-15 07:26:30 +0000
committerKaz Kojima <kkojima@gcc.gnu.org>2007-02-15 07:26:30 +0000
commit70c48f7e03f63e114234025ee6dfd8f5c0657f09 (patch)
treeb66ed38739f88bd7e71d4520fede4c5b881ce409 /gcc/reload1.c
parentb9af85b81fa8b2556179395ce7be95cea083b881 (diff)
downloadgcc-70c48f7e03f63e114234025ee6dfd8f5c0657f09.tar.gz
re PR rtl-optimization/29599 (ICE when building the kernel on SH4)
PR rtl-optimization/29599 Backport from mainline. * reload1.c (eliminate_regs_in_insn): Take the destination mode into account when computing the offset. From-SVN: r121985
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 4244b298308..0d489303619 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.
@@ -3092,6 +3092,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)),