This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix var-tracking ICE with ENTRY_VALUE (PR debug/49250)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 1 Jun 2011 23:49:44 +0200
- Subject: [committed] Fix var-tracking ICE with ENTRY_VALUE (PR debug/49250)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
This is something I've introduced through cselib_subst_to_values
substing ENTRY_VALUE to corresponding VALUE and have been fixing already
in the
* var-tracking.c (replace_expr_with_values): Return NULL for
ENTRY_VALUE too.
hunk. Apparently there are other 3 places where it needs to be handled
similarly. If a MEM has ENTRY_VALUE address, equating of cselib_lookup
on the ENTRY_VALUE and cselib_subst_to_values of it (which returns
the same thing) results in set_slot_part ICEs.
Fixed by not doing that for ENTRY_VALUEs, like it isn't done e.g. for REGs
which have the same problem.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk
as obvious.
2011-06-01 Jakub Jelinek <jakub@redhat.com>
PR debug/49250
* var-tracking.c (add_uses, add_stores): Don't call
cselib_subst_to_values on ENTRY_VALUE.
--- gcc/var-tracking.c.jj 2011-06-01 10:51:30.000000000 +0200
+++ gcc/var-tracking.c 2011-06-01 18:59:15.000000000 +0200
@@ -5052,6 +5052,7 @@ add_uses (rtx *ploc, void *data)
if (MEM_P (vloc)
&& !REG_P (XEXP (vloc, 0))
&& !MEM_P (XEXP (vloc, 0))
+ && GET_CODE (XEXP (vloc, 0)) != ENTRY_VALUE
&& (GET_CODE (XEXP (vloc, 0)) != PLUS
|| XEXP (XEXP (vloc, 0), 0) != cfa_base_rtx
|| !CONST_INT_P (XEXP (XEXP (vloc, 0), 1))))
@@ -5130,6 +5131,7 @@ add_uses (rtx *ploc, void *data)
if (MEM_P (oloc)
&& !REG_P (XEXP (oloc, 0))
&& !MEM_P (XEXP (oloc, 0))
+ && GET_CODE (XEXP (oloc, 0)) != ENTRY_VALUE
&& (GET_CODE (XEXP (oloc, 0)) != PLUS
|| XEXP (XEXP (oloc, 0), 0) != cfa_base_rtx
|| !CONST_INT_P (XEXP (XEXP (oloc, 0), 1))))
@@ -5383,6 +5385,7 @@ add_stores (rtx loc, const_rtx expr, voi
if (MEM_P (loc) && type == MO_VAL_SET
&& !REG_P (XEXP (loc, 0))
&& !MEM_P (XEXP (loc, 0))
+ && GET_CODE (XEXP (loc, 0)) != ENTRY_VALUE
&& (GET_CODE (XEXP (loc, 0)) != PLUS
|| XEXP (XEXP (loc, 0), 0) != cfa_base_rtx
|| !CONST_INT_P (XEXP (XEXP (loc, 0), 1))))
Jakub