re PR rtl-optimization/56023 ([alpha] -fcompare-debug failure due to sched1 pass)
authorUros Bizjak <uros@gcc.gnu.org>
Mon, 21 Jan 2013 17:51:23 +0000 (18:51 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 21 Jan 2013 17:51:23 +0000 (18:51 +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: r195342

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

index 20f2073762c9965e36d994548718de9427491237..196a26e06ff129a06e72b3681e9fb4dd9951c630 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>
 
        PR middle-end/56022
index f0a4dd5bfc8e228e0f53993891ba11248fffdcf6..c4591bfe35b9d855309bda5c9a8780d5dd7b51a9 100644 (file)
@@ -6809,6 +6809,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 0b3d2b717680d94509b0ad0e749eb35c62e75212..385cd9cebb10be7ca9cec1ca42d2b523b9f74763 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>
 
        PR middle-end/56022
@@ -11,7 +16,7 @@
 
        PR debug/53235
        * g++.dg/debug/dwarf2/nested-4.C: XFAIL on darwin.
-       
+
 2013-01-20  Hans-Peter Nilsson  <hp@axis.com>
 
        * gfortran.dg/inquire_10.f90: Run only for non-newlib targets.
 
 2013-01-17  Jack Howarth <howarth@bromo.med.uc.edu>
 
-        PR sanitizer/55679
-        * g++.dg/asan/interception-test-1.C: Skip on darwin.
-        * lib/target-supports.exp (check_effective_target_swapcontext): Use
-        check_no_compiler_messages to test support in ucontext.h.
+       PR sanitizer/55679
+       * g++.dg/asan/interception-test-1.C: Skip on darwin.
+       * lib/target-supports.exp (check_effective_target_swapcontext): Use
+       check_no_compiler_messages to test support in ucontext.h.
        (check_effective_target_setrlimit): Return 0 for Darwin's non-posix
        compliant RLIMIT_AS.
 
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;
+    }
+}