+2010-05-30 Jan Hubicka <jh@suse.cz>
+
+ * dwarf2out.c (reference_to_unused,
+ premark_types_used_by_global_vars_helper): Avoid creating of new
+ varool nodes.
+
2010-05-30 Jan Hubicka <jh@suse.cz>
* cgraph.h (cgraph_node_cannot_return,
return *tp;
else if (TREE_CODE (*tp) == VAR_DECL)
{
- struct varpool_node *node = varpool_node (*tp);
- if (!node->needed)
+ struct varpool_node *node = varpool_get_node (*tp);
+ if (!node || !node->needed)
return *tp;
}
else if (TREE_CODE (*tp) == FUNCTION_DECL
{
/* Ask cgraph if the global variable really is to be emitted.
If yes, then we'll keep the DIE of ENTRY->TYPE. */
- struct varpool_node *node = varpool_node (entry->var_decl);
- if (node->needed)
+ struct varpool_node *node = varpool_get_node (entry->var_decl);
+ if (node && node->needed)
{
die->die_perennial_p = 1;
/* Keep the parent DIEs as well. */