This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in ra-colorize.c:merge_moves?
- From: Michael Matz <matz at suse dot de>
- To: Christian Ehrhardt <ehrhardt at mathematik dot uni-ulm dot de>
- Cc: <gcc at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 25 Feb 2003 17:57:15 +0100 (CET)
- Subject: Re: Bug in ra-colorize.c:merge_moves?
Hi,
On Tue, 25 Feb 2003, Christian Ehrhardt wrote:
> this is merge_moves from ra-colorize.c which has somewhat broken list
> handling IMHO.
Hmm, I must have been half asleep, when I wrote that. Although note, that
with the default setting of flags noone will notice that error, as
web->moves is empty with optimistic coalescing. I'll commit the below
patch, once bootstrapping/regtesting on i686-linux is done (regalloc
branch and HEAD). I'm unclear if I need permission for 3.3.
Ciao,
Michael.
--
* ra-colorize.c (merge_moves): Fix list handling.
Index: ra-colorize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra-colorize.c,v
retrieving revision 1.1.2.9
diff -u -p -r1.1.2.9 ra-colorize.c
--- ra-colorize.c 21 Feb 2003 00:45:10 -0000 1.1.2.9
+++ ra-colorize.c 25 Feb 2003 16:45:16 -0000
@@ -550,13 +550,14 @@ merge_moves (u, v)
struct web *u, *v;
{
regset seen;
- struct move_list *ml;
+ struct move_list *ml, *ml_next;
seen = BITMAP_XMALLOC ();
for (ml = u->moves; ml; ml = ml->next)
bitmap_set_bit (seen, INSN_UID (ml->move->insn));
- for (ml = v->moves; ml; ml = ml->next)
+ for (ml = v->moves; ml; ml = ml_next)
{
+ ml_next = ml->next;
if (! bitmap_bit_p (seen, INSN_UID (ml->move->insn)))
{
ml->next = u->moves;