aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-03-29 01:53:46 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-03-29 01:53:46 +0200
commit2b80199f41d444c88474b32792a7e828f2a96b68 (patch)
tree7d5601e9e49e4f8fa5cf78fc46ce899d76d94f4f /gcc/cfgexpand.c
parentb9da60aea69647fd7957dc328a8431412157d3a7 (diff)
downloadgcc-2b80199f41d444c88474b32792a7e828f2a96b68.zip
gcc-2b80199f41d444c88474b32792a7e828f2a96b68.tar.gz
gcc-2b80199f41d444c88474b32792a7e828f2a96b68.tar.bz2
re PR debug/48203 (ICE in dwarf2out.c while building eglibc.)
PR debug/48203 * cfgexpand.c (expand_debug_expr) <case SSA_NAME>: Only create ENTRY_VALUE if incoming or address of incoming's MEM is a hard REG. * dwarf2out.c (mem_loc_descriptor): Don't emit DW_OP_GNU_entry_value of DW_OP_fbreg. * var-tracking.c (vt_add_function_parameter): Ensure cselib_lookup on ENTRY_VALUE is able to find the canonical parameter VALUE. * cselib.c (rtx_equal_for_cselib_1) <case ENTRY_VALUE>: Use rtx_equal_p instead of rtx_equal_for_cselib_1 to compare ENTRY_VALUE_EXPs. (cselib_hash_rtx) <case ENTRY_VALUE>: If ENTRY_VALUE_EXP is a REG_P or MEM_P with REG_P address, compute hash directly instead of calling cselib_hash_rtx on ENTRY_VALUE_EXP. (preserve_only_constants): Don't clear VALUES forwaring ENTRY_VALUE to some other VALUE. * gcc.dg/pr48203.c: New test. From-SVN: r171640
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index da40aae..e075c53 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -3172,8 +3172,10 @@ expand_debug_expr (tree exp)
rtx incoming = DECL_INCOMING_RTL (SSA_NAME_VAR (exp));
if (incoming
&& GET_MODE (incoming) != BLKmode
- && (REG_P (incoming)
- || (MEM_P (incoming) && REG_P (XEXP (incoming, 0)))))
+ && ((REG_P (incoming) && HARD_REGISTER_P (incoming))
+ || (MEM_P (incoming)
+ && REG_P (XEXP (incoming, 0))
+ && HARD_REGISTER_P (XEXP (incoming, 0)))))
{
op0 = gen_rtx_ENTRY_VALUE (GET_MODE (incoming));
ENTRY_VALUE_EXP (op0) = incoming;