[PATCH] Fix an RTL sharing bug in CSE, exposed on M32R Linux

Segher Boessenkool segher@kernel.crashing.org
Sat Sep 8 13:35:00 GMT 2007


This problem caused an ICE during Linux kernel build (sched.c), exposed
by the new shared RTL checking.

Bootstrapped and testsuite run all default languages, no new failures,
on x86_64-linux.  Also fixes the original problem, of course.

Okay to apply?


Segher


2007-09-08  Segher Boessenkool  <segher@kernel.crashing.org>

	* cse.c (fold_rtx): Use validate_unshare_change() instead of
	validate_change() in one more case.

---
 gcc/cse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gcc/cse.c b/gcc/cse.c
index fc4f895..39dbfab 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3102,7 +3102,7 @@ fold_rtx (rtx x, rtx insn)
 	if (insn == NULL_RTX && !changed)
 	  x = copy_rtx (x);
 	changed = 1;
-	validate_change (insn, &XEXP (x, i), folded_arg, 1);
+	validate_unshare_change (insn, &XEXP (x, i), folded_arg, 1);
       }
 
   if (changed)
-- 
1.5.2.2.g4d9b-dirty



More information about the Gcc-patches mailing list