]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/52287 (ICE in ready_remove_first, at haifa-sched.c:1927)
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 23 Feb 2012 22:15:44 +0000 (22:15 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 23 Feb 2012 22:15:44 +0000 (22:15 +0000)
PR bootstrap/52287
* haifa-sched.c (rank_for_schedule): Stabilize sort for debug insns.

From-SVN: r184531

gcc/ChangeLog
gcc/haifa-sched.c

index 6a747c78c8a9acdba9e5f89d9c77d60f053a9ee9..d9fb3b2732400fda769b2287d357c927ff25d4dd 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-23  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR bootstrap/52287
+       * haifa-sched.c (rank_for_schedule): Stabilize sort for debug insns.
+
 2012-02-23  Uros Bizjak  <ubizjak@gmail.com>
 
        PR c/52290
index b6a8b0c8884a4eda9850891481bb19fbad918326..09c6af22d436d838b9f33720d8db1a86162a936e 100644 (file)
@@ -1647,8 +1647,10 @@ rank_for_schedule (const void *x, const void *y)
       /* Schedule debug insns as early as possible.  */
       if (DEBUG_INSN_P (tmp) && !DEBUG_INSN_P (tmp2))
        return -1;
-      else if (DEBUG_INSN_P (tmp2))
+      else if (!DEBUG_INSN_P (tmp) && DEBUG_INSN_P (tmp2))
        return 1;
+      else if (DEBUG_INSN_P (tmp) && DEBUG_INSN_P (tmp2))
+       return INSN_LUID (tmp) - INSN_LUID (tmp2);
     }
 
   /* The insn in a schedule group should be issued the first.  */