This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: MEP: Fix use of delete_insn.


Hi DJ,

  The delete_insn() function no longer returns the insn after the one
  that has been deleted, so gcc/config/mep/mep.c:mep_reorg_regmove() no
  longer compiles.  The patch below is a simple fix for the problem, but
  I was not sure whether it would be better to use
  next_nonnote_nondebug_insn() instead.  What do you think ?

Cheers
  Nick

gcc/ChangeLog
2012-06-29  Nick Clifton  <nickc@redhat.com>

	* config/mep/mep.c (mep_reorg_regmove): Get next insn before
	calling delete_insn.

Index: gcc/config/mep/mep.c
===================================================================
--- gcc/config/mep/mep.c	(revision 189064)
+++ gcc/config/mep/mep.c	(working copy)
@@ -5096,7 +5096,8 @@
 					       follow, where))
 		{
 		  count ++;
-		  next = delete_insn (insn);
+		  next = NEXT_INSN (insn);
+		  delete_insn (insn);
 		  if (dump_file)
 		    {
 		      fprintf (dump_file, "\n----- Success!  new insn:\n\n");


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]