aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-02-15 21:41:03 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2006-02-15 21:41:03 +0100
commit01ea23f3d250c13a0097cd22e6d36390941c4c97 (patch)
treef3b03f728a76b77ce4adaca3c4525a06bed79409 /gcc/combine.c
parentfb57dc0bf0b060e936dbb376ceca3eca35c15787 (diff)
downloadgcc-01ea23f3d250c13a0097cd22e6d36390941c4c97.zip
gcc-01ea23f3d250c13a0097cd22e6d36390941c4c97.tar.gz
gcc-01ea23f3d250c13a0097cd22e6d36390941c4c97.tar.bz2
re PR middle-end/26300 (ICE in trunc_int_for_mode)
PR middle-end/26300 * combine.c (make_extraction): Bail out if ORIG_POS is negative. * gcc.c-torture/compile/20060215-1.c: New test. From-SVN: r111116
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index d4ea689..96ebd20 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -6249,6 +6249,9 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
|| orig_pos + len > GET_MODE_BITSIZE (wanted_inner_mode)))
return 0;
+ if (orig_pos < 0)
+ return 0;
+
inner = force_to_mode (inner, wanted_inner_mode,
pos_rtx
|| len + orig_pos >= HOST_BITS_PER_WIDE_INT