aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-06-25 11:32:44 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2003-06-25 09:32:44 +0000
commit380e198464b8fdf03634c2444fdd68a37e788ccc (patch)
tree2e73ac97319379321a76fff87f820f4181b0d57f /gcc/varasm.c
parent3f8b659dbd68143422a958784af3e7d33a89200a (diff)
downloadgcc-380e198464b8fdf03634c2444fdd68a37e788ccc.zip
gcc-380e198464b8fdf03634c2444fdd68a37e788ccc.tar.gz
gcc-380e198464b8fdf03634c2444fdd68a37e788ccc.tar.bz2
varasm.c (assemble_name): Mark needed variables even when global info is ready.
* varasm.c (assemble_name): Mark needed variables even when global info is ready. From-SVN: r68472
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 73abd5e..c2bd4b3 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1747,14 +1747,17 @@ assemble_name (file, name)
id = maybe_get_identifier (real_name);
if (id)
{
- if (!TREE_SYMBOL_REFERENCED (id)
- && !cgraph_global_info_ready)
+ if (!TREE_SYMBOL_REFERENCED (id))
{
- struct cgraph_node *node = cgraph_node_for_identifier (id);
+ struct cgraph_node *node;
struct cgraph_varpool_node *vnode;
- if (node)
- cgraph_mark_needed_node (node, 1);
+ if (!cgraph_global_info_ready)
+ {
+ node = cgraph_node_for_identifier (id);
+ if (node)
+ cgraph_mark_needed_node (node, 1);
+ }
vnode = cgraph_varpool_node_for_identifier (id);
if (vnode)