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 ca1c5ac..dbc85d5 100644 (file)
@@ -1,5 +1,10 @@
 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
        PR tree-optimization/91975
        * tree-ssa-loop-ivcanon.c (constant_after_peeling): Revert
index 85521ed..55e3c5c 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)
        {