regmove sometimes fails to update basic_block_end

Jeffrey A Law
Thu Oct 1 19:02:00 GMT 1998

  In message <Pine.SOL.3.90.980930160250.18576L-100000@matula.informatik.rwth-a>you write:
  > The current egcs snapshots have a bug in regmove.c which may lead to
  > basic_block_end not being updated properly after emitting new insns.
  > A test case can be found in gcc.c-torture/unsorted/charmtst.c.  The bug
  > will trigger when this is compiled on an i586-linux system and can be
  > observed in the charmtst.c.regmove dump.
  > I've attached a suggested fix.  This fix relies on the basic block heads
  > being correct in all cases (regmove does try to update them).
  > Handling this sort of thing would be easier if every insn had an additional
  > field that carried the basic block number.  Would such a change be applied?
  > Bernd
  > 	* regmove.c (regmove_optimize): Add variable old_max_uid.
  > 	At the end of the function, update basic_block_end.
Thanks for the comments in the later message.  I agree, your patch is simpler
than trying to keep basic_block_end up to date on the fly.

I've installed this patch.

More information about the Gcc-patches mailing list