aboutsummaryrefslogtreecommitdiff
path: root/gcc/cselib.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2009-09-08 17:44:10 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2009-09-08 17:44:10 +0000
commitda4a947987f3486f79a8363b5519096cac4590f2 (patch)
tree5dc1f988190f14afa040d48d8bb3131c91e5e65d /gcc/cselib.c
parent713e2ea6b6e3016e04c6e750828cd8f1e0bf1d0b (diff)
downloadgcc-da4a947987f3486f79a8363b5519096cac4590f2.zip
gcc-da4a947987f3486f79a8363b5519096cac4590f2.tar.gz
gcc-da4a947987f3486f79a8363b5519096cac4590f2.tar.bz2
re PR debug/41276 (Segmentation fault in lookup_page_table_entry)
PR debug/41276 PR debug/41307 * cselib.c (cselib_expand_value_rtx_1): Don't return copy of invalid subreg. From-SVN: r151523
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r--gcc/cselib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 8d52c51..927f93c 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -1165,12 +1165,12 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd,
scopy = simplify_gen_subreg (GET_MODE (orig), subreg,
GET_MODE (SUBREG_REG (orig)),
SUBREG_BYTE (orig));
- if (scopy == NULL
- || (GET_CODE (scopy) == SUBREG
- && !REG_P (SUBREG_REG (scopy))
- && !MEM_P (SUBREG_REG (scopy))
- && (REG_P (SUBREG_REG (orig))
- || MEM_P (SUBREG_REG (orig)))))
+ if ((scopy == NULL
+ || (GET_CODE (scopy) == SUBREG
+ && !REG_P (SUBREG_REG (scopy))
+ && !MEM_P (SUBREG_REG (scopy))))
+ && (REG_P (SUBREG_REG (orig))
+ || MEM_P (SUBREG_REG (orig))))
return shallow_copy_rtx (orig);
return scopy;
}