This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Bug in ra-colorize.c:merge_moves?
- From: "Christian Ehrhardt" <ehrhardt at mathematik dot uni-ulm dot de>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 25 Feb 2003 09:28:33 +0100
- Subject: Bug in ra-colorize.c:merge_moves?
Hi,
this is merge_moves from ra-colorize.c which has somewhat broken list
handling IMHO. Look at the line marked with XXX, this changes ml->next
but the for-loop at the place marked with YYY will later on try to move
to the next element that previously followed ml by setting ml to ml->next.
void
merge_moves (u, v)
struct web *u, *v;
{
regset seen;
struct move_list *ml;
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 /* YYY */ )
{
if (! bitmap_bit_p (seen, INSN_UID (ml->move->insn)))
{
ml->next = u->moves; /* XXX */
u->moves = ml;
}
}
BITMAP_XFREE (seen);
v->moves = NULL;
}
regards Christian
--
THAT'S ALL FOLKS!