aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndy Hutchinson <hutchinsonandy@aim.com>2008-06-09 22:38:34 +0000
committerAndy Hutchinson <hutchinsonandy@gcc.gnu.org>2008-06-09 22:38:34 +0000
commit3115c00d859324d044aa4cf0a150d9b47c3a82c9 (patch)
tree2b14bbfbca7889390d827064e5e94c1c50b46318 /gcc
parent5cb0cd01c181878188c31d9dd519644af6a202e4 (diff)
downloadgcc-3115c00d859324d044aa4cf0a150d9b47c3a82c9.zip
gcc-3115c00d859324d044aa4cf0a150d9b47c3a82c9.tar.gz
gcc-3115c00d859324d044aa4cf0a150d9b47c3a82c9.tar.bz2
re PR middle-end/36447 (simplify_subreg ICE with right shift more than length type AVR)
PR middle-end/36447 * simplify-rtx.c (simplify_subreg): Add check for shift count greater than size. From-SVN: r136602
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/simplify-rtx.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f3fbaa2..de08933 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-09 Andy Hutchinson <hutchinsonandy@aim.com>
+
+ PR middle-end/36447
+ * simplify-rtx.c (simplify_subreg): Add check for shift count
+ greater than size.
+
2008-06-09 Richard Sandiford <rdsandiford@googlemail.com>
* doc/md.texi: Synchronize with later constraints.md change.
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 15e4c2a..262c919 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -5265,6 +5265,7 @@ simplify_subreg (enum machine_mode outermode, rtx op,
&& GET_MODE_BITSIZE (innermode) >= (2 * GET_MODE_BITSIZE (outermode))
&& GET_CODE (XEXP (op, 1)) == CONST_INT
&& (INTVAL (XEXP (op, 1)) & (GET_MODE_BITSIZE (outermode) - 1)) == 0
+ && INTVAL (XEXP (op, 1)) < GET_MODE_BITSIZE (innermode)
&& byte == subreg_lowpart_offset (outermode, innermode))
{
int shifted_bytes = INTVAL (XEXP (op, 1)) / BITS_PER_UNIT;