aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2013-01-21 18:51:23 +0100
committerUros Bizjak <uros@gcc.gnu.org>2013-01-21 18:51:23 +0100
commit35d59da7f7e282a68589d8c857ee7f0503d588d2 (patch)
tree420ed892f31aad18a6c875db7e5f2e69229fc62a
parent5b9db1bc19b99bc1f401dcadeaa616155f31521a (diff)
downloadgcc-35d59da7f7e282a68589d8c857ee7f0503d588d2.zip
gcc-35d59da7f7e282a68589d8c857ee7f0503d588d2.tar.gz
gcc-35d59da7f7e282a68589d8c857ee7f0503d588d2.tar.bz2
re PR rtl-optimization/56023 ([alpha] -fcompare-debug failure due to sched1 pass)
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/haifa-sched.c3
-rw-r--r--gcc/testsuite/ChangeLog15
-rw-r--r--gcc/testsuite/gcc.dg/pr56023.c19
4 files changed, 38 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 20f2073..196a26e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index f0a4dd5..c4591bfe 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -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;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0b3d2b7..385cd9c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
@@ -69,10 +74,10 @@
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
index 0000000..f1942ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56023.c
@@ -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;
+ }
+}