+2019-11-13 Jan Hubicka <hubicka@ucw.cz>
+ Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/92454
+ * ipa-cp.c (spread_undeadness): Check that IPA_NODE_REF exists.
+ (identify_dead_nodes): Likewise.
+
2019-11-13 Martin Liska <mliska@suse.cz>
* ipa-icf.c (sem_function::equals_private): Do not overuse
callee = cs->callee->function_symbol (NULL);
info = IPA_NODE_REF (callee);
- if (info->node_dead)
+ if (info && info->node_dead)
{
info->node_dead = 0;
spread_undeadness (callee);
struct cgraph_node *v;
for (v = node; v; v = ((struct ipa_dfs_info *) v->aux)->next_cycle)
if (v->local
+ && IPA_NODE_REF (v)
&& !v->call_for_symbol_thunks_and_aliases
(has_undead_caller_from_outside_scc_p, NULL, true))
IPA_NODE_REF (v)->node_dead = 1;
for (v = node; v; v = ((struct ipa_dfs_info *) v->aux)->next_cycle)
- if (!IPA_NODE_REF (v)->node_dead)
+ if (IPA_NODE_REF (v) && !IPA_NODE_REF (v)->node_dead)
spread_undeadness (v);
if (dump_file && (dump_flags & TDF_DETAILS))
{
for (v = node; v; v = ((struct ipa_dfs_info *) v->aux)->next_cycle)
- if (IPA_NODE_REF (v)->node_dead)
+ if (IPA_NODE_REF (v) && IPA_NODE_REF (v)->node_dead)
fprintf (dump_file, " Marking node as dead: %s.\n", v->dump_name ());
}
}
+2019-11-13 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/92454
+ * ipa-cp.c (spread_undeadness): Check that IPA_NODE_REF exists.
+ (identify_dead_nodes): Likewise.
+
2019-11-13 Martin Liska <mliska@suse.cz>
* gcc.dg/ipa/ipa-icf-39.c: Update -fdbg-cnt to the new format.
--- /dev/null
+/* Originally PR ipa/91969, options adjusted for PR ipa/92454 */
+/* { dg-options "-O3 --param ipa-cp-eval-threshold=1" } */
+
+enum by
+{
+};
+class A
+{
+public:
+ class B
+ {
+ public:
+ virtual void m_fn2 (by) = 0;
+ };
+ virtual int m_fn1 ();
+ B *cf;
+};
+by a;
+class C : A, A::B
+{
+ void m_fn2 (by);
+};
+void C::m_fn2 (by) { cf->m_fn2 (a); }
+
+struct a
+{
+ virtual ~a ();
+};
+
+struct b
+{
+ virtual void d (...);
+};
+
+struct c : a, b
+{
+ void d (...) {}
+};