diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-03 16:33:27 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-03 16:33:27 +0000 |
commit | 8c3c665582f99fd2a54866b54f219dc1df572cad (patch) | |
tree | c6086d53d5f1440bbe0cee53b9ebebe355588bda | |
parent | d92e3973a3b00439bae305db83520b1305f7e65b (diff) | |
download | gcc-8c3c665582f99fd2a54866b54f219dc1df572cad.tar.gz |
PR debug/41236
* dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on
SIGN_EXTEND or ZERO_EXTEND. Don't assume there is a REG inside of
it or SUBREG.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151385 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4e3758bf00..0f5facee807 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2009-09-03 Jakub Jelinek <jakub@redhat.com> + PR debug/41236 + * dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on + SIGN_EXTEND or ZERO_EXTEND. Don't assume there is a REG inside of + it or SUBREG. + PR debug/41238 * function.c (assign_parm_find_stack_rtl): Don't set mem attributes on the stack slot if it is passed by invisible reference. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 453e5e9fbc8..62459e237f3 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11671,21 +11671,23 @@ loc_descriptor (rtx rtl, enum machine_mode mode, switch (GET_CODE (rtl)) { case SUBREG: - case SIGN_EXTEND: - case ZERO_EXTEND: /* The case of a subreg may arise when we have a local (register) variable or a formal (register) parameter which doesn't quite fill up an entire register. For now, just assume that it is legitimate to make the Dwarf info refer to the whole register which contains the given subreg. */ - rtl = SUBREG_REG (rtl); - - /* ... fall through ... */ + loc_result = loc_descriptor (SUBREG_REG (rtl), mode, initialized); + break; case REG: loc_result = reg_loc_descriptor (rtl, initialized); break; + case SIGN_EXTEND: + case ZERO_EXTEND: + loc_result = loc_descriptor (XEXP (rtl, 0), mode, initialized); + break; + case MEM: loc_result = mem_loc_descriptor (XEXP (rtl, 0), GET_MODE (rtl), initialized); |