diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2009-01-16 18:56:47 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2009-01-16 18:56:47 +0000 |
commit | c1cb09ada04abbf0087eafedaab7b3ec32b23659 (patch) | |
tree | d4ea4ae380071612d851ae5d3fd829977e11de0a /gcc/expmed.c | |
parent | 1ceb2263cf6a4e682709c2a8eb38b348943e99dd (diff) | |
download | gcc-c1cb09ada04abbf0087eafedaab7b3ec32b23659.zip gcc-c1cb09ada04abbf0087eafedaab7b3ec32b23659.tar.gz gcc-c1cb09ada04abbf0087eafedaab7b3ec32b23659.tar.bz2 |
re PR target/38554 (ICE when compiling pamfunc.c in netpbm with -O1 enabled)
PR target/38554
* expmed.c (expand_shift): With SHIFT_COUNT_TRUNCATED, don't lift
the subreg from a lowpart subreg if it is also casting the value.
testsuite/
PR target/38554
* gcc.c-torture/compile/pr38554.c: New test.
From-SVN: r143440
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 9ee5f29..da0db3b 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2136,7 +2136,8 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted, op1 = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (op1) % GET_MODE_BITSIZE (mode)); else if (GET_CODE (op1) == SUBREG - && subreg_lowpart_p (op1)) + && subreg_lowpart_p (op1) + && INTEGRAL_MODE_P (GET_MODE (SUBREG_REG (op1)))) op1 = SUBREG_REG (op1); } |