From: Jakub Jelinek Date: Thu, 15 Sep 2016 12:27:35 +0000 (+0200) Subject: re PR rtl-optimization/77425 (Pointer test follows dereference in sched-int.h) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63c879fca4a3d82c0b8a5c5f42926419259f01ec;p=gcc.git 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 --- 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;