Commit b786d31f by Jan Hubicka Committed by Jan Hubicka

re PR ipa/59265 (Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006)


	PR ipa/59265
	* ipa-prop.c (ipa_analyze_call_uses): Skip already
	devirtualized calls.
	g++.dg/torture/pr59265.C: New testcase.

From-SVN: r206004
parent 88fab00d
2013-12-14 Jan Hubicka <jh@suse.cz>
PR ipa/59265
* ipa-prop.c (ipa_analyze_call_uses): Skip already
devirtualized calls.
2013-12-14 Jan Hubicka <jh@suse.cz>
PR middle-end/58477
* ipa-prop.c (stmt_may_be_vtbl_ptr_store): Skip clobbers.
......@@ -2024,8 +2024,17 @@ ipa_analyze_call_uses (struct cgraph_node *node,
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);
......
2013-12-14 Jan Hubicka <jh@suse.cz>
PR ipa/59265
g++.dg/torture/pr59265.C: New testcase.
2013-12-15 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/vect/vect-nop-move.c (foo32x2_be): Call
......
// { dg-do compile }
// { dg-options "-fprofile-use -std=gnu++11" }
class A {
int m_fn1() const;
unsigned m_fn2() const;
};
class B {
public:
virtual void m_fn1();
};
class C final : B {
C();
virtual void m_fn2() { m_fn1(); }
};
int a;
unsigned A::m_fn2() const {
if (m_fn1())
return 0;
a = m_fn2();
}
C::C() {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment