From da4a947987f3486f79a8363b5519096cac4590f2 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 8 Sep 2009 17:44:10 +0000 Subject: 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 --- gcc/cselib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gcc/cselib.c') 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; } -- cgit v1.1