From 63c879fca4a3d82c0b8a5c5f42926419259f01ec Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 15 Sep 2016 14:27:35 +0200 Subject: [PATCH] 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 --- gcc/ChangeLog | 4 ++++ gcc/sched-int.h | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 26a8f59fad3..d4ad3c9a9d2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2016-09-15 Jakub Jelinek + 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 de5d3269266..b4a7f925287 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; -- 2.30.2