aboutsummaryrefslogtreecommitdiff
path: root/gcc/sched-int.h
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/sched-int.h
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/sched-int.h')
-rw-r--r--gcc/sched-int.h7
1 files changed, 4 insertions, 3 deletions
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;