From d9c425fb659c7df40eddf66349d846ed0cf63fda Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 30 Jul 2019 16:52:29 +0200 Subject: [PATCH] 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 --- gcc/ChangeLog | 7 +++++++ gcc/cgraph.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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; } -- 2.30.2