diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-08 17:44:10 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-08 17:44:10 +0000 |
commit | 2a60612cdc6af2a47d3eafb7c729230d055e2dac (patch) | |
tree | 5dc1f988190f14afa040d48d8bb3131c91e5e65d /gcc | |
parent | 81540bae22fbff1c51ccdb4952b0c7d1ab144c2c (diff) | |
download | gcc-2a60612cdc6af2a47d3eafb7c729230d055e2dac.tar.gz |
PR debug/41276
PR debug/41307
* cselib.c (cselib_expand_value_rtx_1): Don't return copy of
invalid subreg.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151523 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cselib.c | 12 |
2 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af8b9ef1317..5bee13ce29c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 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. 2009-09-08 Alexandre Oliva <aoliva@redhat.com> diff --git a/gcc/cselib.c b/gcc/cselib.c index 8d52c519ff3..927f93cbb79 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; } |