===================================================================
@@ -599,6 +599,13 @@ lto_symtab_merge_symbols (void)
&& (cnode2 = cgraph_get_node (node->symbol.decl))
&& cnode2 != cnode)
lto_cgraph_replace_node (cnode2, cnode);
+
+ /* Abstract functions may have duplicated cgraph nodes attached;
+ remove them. */
+ else if (cnode && DECL_ABSTRACT (cnode->symbol.decl)
+ && (cnode2 = cgraph_get_node (node->symbol.decl))
+ && cnode2 != cnode)
+ cgraph_remove_node (cnode2);
symtab_insert_node_to_hashtable ((symtab_node)node);
}
}
===================================================================
@@ -1347,13 +1347,13 @@ symtab_real_symbol_p (symtab_node node)
{
struct cgraph_node *cnode;
+ if (DECL_ABSTRACT (node->symbol.decl))
+ return false;
if (!is_a <cgraph_node> (node))
return true;
cnode = cgraph (node);
if (cnode->global.inlined_to)
return false;
- if (cnode->abstract_and_needed)
- return false;
return true;
}
#endif /* GCC_CGRAPH_H */