This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix redirection in ipa.c
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 9 Sep 2013 08:15:24 +0200
- Subject: Fix redirection in ipa.c
- Authentication-results: sourceware.org; auth=none
Hi,
this patch fixes ICE when edge redirection happens just before summary generation.
At that time we still don't want edges to be redirected when underlying statements
are not.
Bootstrapped/regtested x86_64-linux, comitted.
* ipa.c (walk_polymorphic_call_targets): Fix redirection before IPA
summary generation.
Index: ipa.c
===================================================================
--- ipa.c (revision 202370)
+++ ipa.c (working copy)
@@ -220,9 +220,9 @@ walk_polymorphic_call_targets (pointer_s
edge->caller->symbol.order,
cgraph_node_name (target), target->symbol.order);
edge = cgraph_make_edge_direct (edge, target);
- if (cgraph_state != CGRAPH_STATE_IPA_SSA)
+ if (!inline_summary_vec && edge->call_stmt)
cgraph_redirect_edge_call_stmt_to_callee (edge);
- else if (inline_summary_vec)
+ else
inline_update_overall_summary (node);
}
}