re PR rtl-optimization/54088 (ICE at dwarf2out.c:20632 with -O1 -g)
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 25 Aug 2012 23:21:53 +0000 (23:21 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 25 Aug 2012 23:21:53 +0000 (23:21 +0000)
PR rtl-optimization/54088
* jump.c (delete_related_insns): Robustify latest change.

From-SVN: r190674

gcc/ChangeLog
gcc/jump.c

index e1ae3c90bf257b82f3d9f2c5ac7660e2a37d2afa..0468d01471c95b93eb80e1ad27f14472c82f8f06 100644 (file)
@@ -1,4 +1,9 @@
-2012-08-26  Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
+2012-08-25  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR rtl-optimization/54088
+       * jump.c (delete_related_insns): Robustify latest change.
+
+2012-08-25  Ricardo Catalinas Jiménez  <jimenezrick@gmail.com>
 
        * doc/extend.texi (__atomic Builtins): Remove space before comma.
 
index d0f3f04a3794a58d6986745377552c3fa8ce90ef..c4f674972b87c79262b6da80961812448a0de581 100644 (file)
@@ -1257,9 +1257,9 @@ delete_related_insns (rtx insn)
          && GET_CODE (PATTERN (insn)) == SEQUENCE
          && CALL_P (XVECEXP (PATTERN (insn), 0, 0))))
     {
-      rtx p = insn;
+      rtx p;
 
-      for (p = NEXT_INSN (p);
+      for (p = next && INSN_DELETED_P (next) ? NEXT_INSN (next) : next;
           p && NOTE_P (p);
           p = NEXT_INSN (p))
        if (NOTE_KIND (p) == NOTE_INSN_CALL_ARG_LOCATION)