summaryrefslogtreecommitdiff
path: root/gcc/varpool.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-19 10:27:50 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-19 10:27:50 +0000
commit5e712541e8e002c811a41bd0a7e8500136d5fbd9 (patch)
tree4656b89b69afb0c42224eaeeaa3e0c4e8a753185 /gcc/varpool.c
parentf03420aa562f462a8cbdb10d55194ce8c534fd50 (diff)
downloadgcc-5e712541e8e002c811a41bd0a7e8500136d5fbd9.tar.gz
* cgraphunit.c (handle_alias_pairs): Also handle wekref with destination
declared. (output_weakrefs): New function. * varpool.c (varpool_create_variable_alias): Handle external aliases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180181 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r--gcc/varpool.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c
index d223779a5c1..e342a9109d9 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -703,9 +703,11 @@ varpool_create_variable_alias (tree alias, tree decl)
gcc_assert (TREE_CODE (alias) == VAR_DECL);
alias_node = varpool_node (alias);
alias_node->alias = 1;
- alias_node->finalized = 1;
+ if (!DECL_EXTERNAL (alias))
+ alias_node->finalized = 1;
alias_node->alias_of = decl;
- if (decide_is_variable_needed (alias_node, alias)
+ if ((!DECL_EXTERNAL (alias)
+ && decide_is_variable_needed (alias_node, alias))
|| alias_node->needed)
varpool_mark_needed_node (alias_node);
return alias_node;