diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-03-17 21:33:54 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-03-17 21:33:54 +0100 |
commit | a82ff31f392508ef56c4021a711ec08982dadf76 (patch) | |
tree | 496891b63014ea8e0128f03a522aec63c8048962 /gcc/dwarf2out.c | |
parent | 82ce305c0ce60d86928e6d2c7451d0401a446a78 (diff) | |
download | gcc-a82ff31f392508ef56c4021a711ec08982dadf76.zip gcc-a82ff31f392508ef56c4021a711ec08982dadf76.tar.gz gcc-a82ff31f392508ef56c4021a711ec08982dadf76.tar.bz2 |
re PR debug/48163 (ICEs for cris-elf, like gcc.c-torture/compile/calls.c gcc.c-torture/execute/complex-1.c)
PR debug/48163
* function.c (assign_parms): For data.passed_pointer parms
use MEM of data.entry_parm instead of data.entry_parm itself
as DECL_INCOMING_RTL.
* dwarf2out.c (rtl_for_decl_location): Use DECL_INCOMING_RTL
also when passed and declared mode is the same, DECL_RTL
is a MEM with pseudo as address and DECL_INCOMING_RTL is
a MEM too.
From-SVN: r171113
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f62bb48..31d9a0e 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -16721,7 +16721,13 @@ rtl_for_decl_location (tree decl) } else if (TREE_CODE (decl) == PARM_DECL) { - if (rtl == NULL_RTX || is_pseudo_reg (rtl)) + if (rtl == NULL_RTX + || is_pseudo_reg (rtl) + || (MEM_P (rtl) + && is_pseudo_reg (XEXP (rtl, 0)) + && DECL_INCOMING_RTL (decl) + && MEM_P (DECL_INCOMING_RTL (decl)) + && GET_MODE (rtl) == GET_MODE (DECL_INCOMING_RTL (decl)))) { tree declared_type = TREE_TYPE (decl); tree passed_type = DECL_ARG_TYPE (decl); @@ -16733,7 +16739,8 @@ rtl_for_decl_location (tree decl) all cases where (rtl == NULL_RTX) just below. */ if (dmode == pmode) rtl = DECL_INCOMING_RTL (decl); - else if (SCALAR_INT_MODE_P (dmode) + else if ((rtl == NULL_RTX || is_pseudo_reg (rtl)) + && SCALAR_INT_MODE_P (dmode) && GET_MODE_SIZE (dmode) <= GET_MODE_SIZE (pmode) && DECL_INCOMING_RTL (decl)) { |