re PR rtl-optimization/77425 (Pointer test follows dereference in sched-int.h)
authorJakub Jelinek <jakub@redhat.com>
Thu, 15 Sep 2016 12:27:35 +0000 (14:27 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 15 Sep 2016 12:27:35 +0000 (14:27 +0200)
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
gcc/sched-int.h

index 26a8f59fad3f817aaea2bed71943f1108fe17fe3..d4ad3c9a9d2cfd178a587a3c33ecc827a96a4a33 100644 (file)
@@ -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
index de5d32692663620af67b5dac06dd5efb5c40e303..b4a7f925287f57f689f6235e3c7dd04ea221dd3b 100644 (file)
@@ -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;