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
This commit is contained in:
Alexandre Oliva 2009-09-08 17:44:10 +00:00 committed by Alexandre Oliva
parent 713e2ea6b6
commit da4a947987
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2009-09-08 Alexandre Oliva <aoliva@redhat.com>
PR debug/41276
PR debug/41307
* cselib.c (cselib_expand_value_rtx_1): Don't return copy of
invalid subreg.
2009-09-08 Alexandre Oliva <aoliva@redhat.com>
* configure: Rebuilt with modified libtool.m4.

View File

@ -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;
}