summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-19 16:16:59 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-19 16:16:59 +0000
commit6c07af386d6d255631b0d7c8100fc5a481c8de39 (patch)
tree90e9a6e0faf50bfcf775a4c2673b0812ce33699c /gcc
parent0ec80471fe5e25ecd3dcb82e2147a7c24c9816f5 (diff)
downloadgcc-6c07af386d6d255631b0d7c8100fc5a481c8de39.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/toplev.c7
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2b7258649b7..4d2160b9eb7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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>
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 16b45d74ced..b2990bcae77 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -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;