]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/56023 ([alpha] -fcompare-debug failure due to sched1 pass)
authorUros Bizjak <ubizjak@gmail.com>
Mon, 21 Jan 2013 18:02:57 +0000 (19:02 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 21 Jan 2013 18:02:57 +0000 (19:02 +0100)
PR rtl-optimization/56023
* haifa-sched.c (fix_inter_tick): Do not update ticks of instructions,
dependent on debug instruction.

testsuite/ChangeLog:

PR rtl-optimization/56023
* gcc.dg/pr56023.c: New test.

From-SVN: r195345

gcc/ChangeLog
gcc/haifa-sched.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr56023.c [new file with mode: 0644]

index 6d73511d62173c3de159d10ebf3b5e4f681ae034..58acfbb9f2d53ce2f398b7e0a8b31675fcdaedd3 100644 (file)
@@ -1,3 +1,9 @@
+2012-01-21  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR rtl-optimization/56023
+       * haifa-sched.c (fix_inter_tick): Do not update ticks of instructions,
+       dependent on debug instruction.
+
 2013-01-21  Martin Jambor  <mjambor@suse.cz>
 
        Backport from mainline
index e16561f4cb9c0446f5889ce5abe479936d8b6df4..cc7c0dac42e7cf9ab81057fa7543fbcc3f5f1223 100644 (file)
@@ -3684,6 +3684,9 @@ fix_inter_tick (rtx head, rtx tail)
              INSN_TICK (head) = tick;
            }
 
+         if (DEBUG_INSN_P (head))
+           continue;
+
          FOR_EACH_DEP (head, SD_LIST_RES_FORW, sd_it, dep)
            {
              rtx next;
index 457de3f23aa9cf9b09614a2a418a5a85a8a88f1c..04748bdb389b7da119c9f305d4818d3f4376c6ab 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-21  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR rtl-optimization/56023
+       * gcc.dg/pr56023.c: New test.
+
 2013-01-21  Martin Jambor  <mjambor@suse.cz>
 
        Backport from mainline
diff --git a/gcc/testsuite/gcc.dg/pr56023.c b/gcc/testsuite/gcc.dg/pr56023.c
new file mode 100644 (file)
index 0000000..f1942ac
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+void
+foo (char *c)
+{
+  unsigned int x = 0;
+  unsigned int i;
+
+  for (i = 0; c[i]; i++)
+    {
+      if (i >= 5 && x != 1)
+       break;
+      else if (c[i] == ' ')
+       x = i;
+      else if (c[i] == '/' && c[i + 1] != ' ' && i)
+       x = i + 1;
+    }
+}