aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-09-15 14:27:35 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-09-15 14:27:35 +0200
commit63c879fca4a3d82c0b8a5c5f42926419259f01ec (patch)
tree3a7327537239b3ec7d2aa489c91f680f9e1ea93b /gcc
parent76ff80fb8bd42fa4c75866b1f952b39c9775c094 (diff)
downloadgcc-63c879fca4a3d82c0b8a5c5f42926419259f01ec.zip
gcc-63c879fca4a3d82c0b8a5c5f42926419259f01ec.tar.gz
gcc-63c879fca4a3d82c0b8a5c5f42926419259f01ec.tar.bz2
re PR rtl-optimization/77425 (Pointer test follows dereference in sched-int.h)
PR rtl-optimization/77425 * sched-int.h (sd_iterator_cond): Don't update it_ptr->linkp if list is NULL. From-SVN: r240163
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/sched-int.h7
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 26a8f59..d4ad3c9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2016-09-15 Jakub Jelinek <jakub@redhat.com>
+ PR rtl-optimization/77425
+ * sched-int.h (sd_iterator_cond): Don't update it_ptr->linkp if list
+ is NULL.
+
PR middle-end/77475
* config/i386/i386.c (ix86_parse_stringop_strategy_string): Simplify,
use %qs instead of %s where desirable, use argument instead of arg in
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index de5d326..b4a7f92 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -1624,10 +1624,11 @@ sd_iterator_cond (sd_iterator_def *it_ptr, dep_t *dep_ptr)
sd_next_list (it_ptr->insn,
&it_ptr->types, &list, &it_ptr->resolved_p);
- it_ptr->linkp = &DEPS_LIST_FIRST (list);
-
if (list)
- continue;
+ {
+ it_ptr->linkp = &DEPS_LIST_FIRST (list);
+ continue;
+ }
}
*dep_ptr = NULL;