diff mbox

[committed] Fix var-tracking ICE with ENTRY_VALUE (PR debug/49250)

Message ID 20110601214944.GY17079@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek June 1, 2011, 9:49 p.m. UTC
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.


	Jakub
diff mbox

Patch

--- 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))))