[Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 15 16:32:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59265
--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Index: ipa-prop.c
===================================================================
--- ipa-prop.c (revision 205941)
+++ ipa-prop.c (working copy)
@@ -2022,9 +2022,18 @@
struct param_analysis_info *parms_ainfo, gimple call)
{
tree target = gimple_call_fn (call);
+ struct cgraph_edge *cs;
- if (!target)
+ if (!target
+ || (TREE_CODE (target) != SSA_NAME
+ && !virtual_method_call_p (target)))
return;
+
+ /* If we previously turned the call into a direct call, there is
+ no need to analyze. */
+ cs = cgraph_edge (node, call);
+ if (cs && !cs->indirect_unknown_callee)
+ return;
if (TREE_CODE (target) == SSA_NAME)
ipa_analyze_indirect_call_uses (node, info, parms_ainfo, call, target);
else if (virtual_method_call_p (target))
Patch I am testing...
More information about the Gcc-bugs
mailing list