From c1cb09ada04abbf0087eafedaab7b3ec32b23659 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Fri, 16 Jan 2009 18:56:47 +0000 Subject: 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 --- gcc/expmed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/expmed.c') 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); } -- cgit v1.1