OSDN Git Service

PR rtl-optimization/56023
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jan 2013 18:02:57 +0000 (18:02 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jan 2013 18:02:57 +0000 (18:02 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@195345 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 6d73511..58acfbb 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 e16561f..cc7c0da 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 457de3f..04748bd 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;
+    }
+}