ipa-inline.c (inline_small_functions): Move assignment to next before call destroying...
authorRichard Biener <rguenther@suse.de>
Fri, 15 Nov 2019 09:38:03 +0000 (09:38 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 15 Nov 2019 09:38:03 +0000 (09:38 +0000)
2019-11-15  Richard Biener  <rguenther@suse.de>

* ipa-inline.c (inline_small_functions): Move assignment
to next before call destroying edge.

From-SVN: r278282

gcc/ChangeLog
gcc/ipa-inline.c

index ca1c5ac9744b6c5243b11585e1c2eff58de76d0f..dbc85d5dfc31dd6155d949760357ec486d98cbe5 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-15  Richard Biener  <rguenther@suse.de>
+
+       * ipa-inline.c (inline_small_functions): Move assignment
+       to next before call destroying edge.
+
 2019-11-15  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/92039
index 85521ed2888700a8c5ceba28d5965e8ba8ac8e7b..55e3c5ce15a1b42d6f2891cc86a60edf84d363e8 100644 (file)
@@ -1932,13 +1932,13 @@ inline_small_functions (void)
       if (has_speculative)
        for (edge = node->callees; edge; edge = next)
          {
+           next = edge->next_callee;
            if (edge->speculative
                && !speculation_useful_p (edge, edge->aux != NULL))
              {
                edge->resolve_speculation ();
                update = true;
              }
-           next = edge->next_callee;
          }
       if (update)
        {