Commit f44703b5 by Andrew Pinski Committed by Andrew Pinski

re PR c++/15721 (template instantation omits static data members)

2004-06-19  Andrew Pinski  <apinski@apple.com>

        PR c++/15721
        * toplev.c (wrapup_global_declarations): Do not check
        TREE_SYMBOL_REFERENCED of the DECL_ASSEMBLER_NAME but check
        cgraph_varpool_node's needed field.

From-SVN: r83386
parent 242229bb
2004-06-19 Andrew Pinski <apinski@apple.com>
PR c++/15721
* toplev.c (wrapup_global_declarations): Do not check
TREE_SYMBOL_REFERENCED of the DECL_ASSEMBLER_NAME but check
cgraph_varpool_node's needed field.
2004-06-19 Jan Hubicka <jh@suse.cz>
Steven Bosscher <stevenb@suse.de>
......
......@@ -762,16 +762,17 @@ wrapup_global_declarations (tree *vec, int len)
if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl))
{
struct cgraph_varpool_node *node;
bool needed = 1;
node = cgraph_varpool_node (decl);
if (flag_unit_at_a_time
&& cgraph_varpool_node (decl)->finalized)
if (flag_unit_at_a_time && node->finalized)
needed = 0;
else if ((flag_unit_at_a_time && !cgraph_global_info_ready)
&& (TREE_USED (decl)
|| TREE_USED (DECL_ASSEMBLER_NAME (decl))))
/* needed */;
else if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
else if (node->needed)
/* needed */;
else if (DECL_COMDAT (decl))
needed = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment