This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: MEP: Fix use of delete_insn.
- From: Nick Clifton <nickc at redhat dot com>
- To: dj at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Jun 2012 09:48:06 +0100
- Subject: 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");