+2015-02-04 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/64686
+ * ipa-inline.c (inline_small_functions): Fix ordering issue between
+ speculation resolution and key updates.
+
2015-02-04 Jan Hubicka <hubicka@ucw.cz>
* ipa-prop.c (update_indirect_edges_after_inlining): By more careful
{
bool update = false;
struct cgraph_edge *next;
+ bool has_speculative = false;
if (dump_file)
fprintf (dump_file, "Enqueueing calls in %s/%i.\n",
gcc_assert (!edge->aux);
update_edge_key (&edge_heap, edge);
}
- if (edge->speculative && !speculation_useful_p (edge, edge->aux != NULL))
+ if (edge->speculative)
+ has_speculative = true;
+ }
+ if (has_speculative)
+ for (edge = node->callees; edge; edge = next)
+ if (edge->speculative && !speculation_useful_p (edge,
+ edge->aux != NULL))
{
edge->resolve_speculation ();
update = true;
}
- }
if (update)
{
struct cgraph_node *where = node->global.inlined_to
+2015-02-04 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/64686
+ * g++.dg/torture/pr64686.C: New testcase.
+
2015-02-04 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/64905
--- /dev/null
+// { dg-do compile }
+class A
+{
+protected:
+ A *m_fn2 (int) const;
+public:
+ virtual A *m_fn1 (int *) const = 0;
+};
+class B : A
+{
+ B (A *, int, A *);
+ A *m_fn1 (int *) const;
+};
+A *
+B::m_fn1 (int *) const
+{
+ new B (m_fn2 (0)->m_fn1 (0), 0, m_fn2 (0)->m_fn1 (0));
+}
+