@@ -4971,7 +4971,7 @@ spread_undeadness (struct cgraph_node *node)
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);
@@ -5009,18 +5009,19 @@ identify_dead_nodes (struct cgraph_node *node)
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 ());
}
}
new file mode 100644
@@ -0,0 +1,38 @@
+/* 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 (...) {}
+};