diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-03-10 19:10:14 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-03-10 19:10:14 +0100 |
commit | 67a2f76d4c054da755bd23ef9a08854b3340b715 (patch) | |
tree | d3d5d4cf117a3e8ec8bb4c015948b76d614c3082 /gcc | |
parent | 4999d9b0135878f24eae78f33142b4929274dd54 (diff) | |
download | gcc-67a2f76d4c054da755bd23ef9a08854b3340b715.zip gcc-67a2f76d4c054da755bd23ef9a08854b3340b715.tar.gz gcc-67a2f76d4c054da755bd23ef9a08854b3340b715.tar.bz2 |
re PR debug/48043 (pr47201: var-tracking loc_order_check fails for type punning examples)
PR debug/48043
* config/s390/s390.c (s390_delegitimize_address): Make sure the
result mode matches original rtl mode.
From-SVN: r170851
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 23 |
2 files changed, 22 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 12c74a1..ca2a952 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-10 Jakub Jelinek <jakub@redhat.com> + + PR debug/48043 + * config/s390/s390.c (s390_delegitimize_address): Make sure the + result mode matches original rtl mode. + 2011-03-10 Nick Clifton <nickc@redhat.com> * config/rx/rx.md (bitset_in_memory, bitclr_in_memory: Fix timings. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 54632dd..4a056d5 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -5027,20 +5027,29 @@ s390_delegitimize_address (rtx orig_x) y = XEXP (XEXP (x, 1), 0); if (GET_CODE (y) == UNSPEC && XINT (y, 1) == UNSPEC_GOT) - return XVECEXP (y, 0, 0); - return orig_x; + y = XVECEXP (y, 0, 0); + else + return orig_x; } - - if (GET_CODE (x) == CONST) + else if (GET_CODE (x) == CONST) { y = XEXP (x, 0); if (GET_CODE (y) == UNSPEC && XINT (y, 1) == UNSPEC_GOTENT) - return XVECEXP (y, 0, 0); - return orig_x; + y = XVECEXP (y, 0, 0); + else + return orig_x; } + else + return orig_x; - return orig_x; + if (GET_MODE (orig_x) != Pmode) + { + y = lowpart_subreg (GET_MODE (orig_x), y, Pmode); + if (y == NULL_RTX) + return orig_x; + } + return y; } /* Output operand OP to stdio stream FILE. |