From: Martin Liska Date: Tue, 30 Jul 2019 14:52:29 +0000 (+0200) Subject: Use edge->indirect_unknown_callee in cgraph_edge::make_direct (PR ipa/89330). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9c425fb659c7df40eddf66349d846ed0cf63fda;p=gcc.git Use edge->indirect_unknown_callee in cgraph_edge::make_direct (PR ipa/89330). 2019-07-30 Martin Liska PR ipa/89330 * cgraph.c (cgraph_edge::make_direct): Use edge->indirect_unknown_callee as edge->resolve_speculation can deallocate edge which is this pointer. From-SVN: r273910 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 05258644174..41cfa85f13c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-07-30 Martin Liska + + PR ipa/89330 + * cgraph.c (cgraph_edge::make_direct): Use + edge->indirect_unknown_callee as edge->resolve_speculation can + deallocate edge which is this pointer. + 2019-07-30 Richard Biener PR tree-optimization/91257 diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 81250acb70c..8dbe705af68 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1215,7 +1215,7 @@ cgraph_edge::make_direct (cgraph_node *callee) edge = edge->resolve_speculation (callee->decl); /* On successful speculation just return the pre existing direct edge. */ - if (!indirect_unknown_callee) + if (!edge->indirect_unknown_callee) return edge; }