summaryrefslogtreecommitdiff
path: root/gcc/varpool.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-04-21 16:41:03 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-04-21 14:41:03 +0000
commitc9945504c9d6e69b961da97948a5b7e40404f10b (patch)
tree518cccaa543aa060a4a7880a9edcef6b9842add4 /gcc/varpool.c
parente7cfce7152f1377ed2db53513f3b0259d8b88718 (diff)
downloadgcc-c9945504c9d6e69b961da97948a5b7e40404f10b.tar.gz
lto.c (globalize_cross_file_statics): When function has address taken, it needs to be public.
* lto.c (globalize_cross_file_statics): When function has address taken, it needs to be public. * varpool.c (decide_is_variable_needed): Variable is always needed during ltrans. From-SVN: r158609
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r--gcc/varpool.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c
index a13742d4957..40decfc867b 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -230,6 +230,12 @@ varpool_reset_queue (void)
bool
decide_is_variable_needed (struct varpool_node *node, tree decl)
{
+ /* We do not track variable references at all and thus have no idea if the
+ variable was referenced in some other partition or not.
+ FIXME: We really need address taken edges in callgraph and varpool to
+ drive WPA and decide whether other partition might reference it or not. */
+ if (flag_ltrans)
+ return true;
/* If the user told us it is used, then it must be so. */
if ((node->externally_visible && !DECL_COMDAT (decl))
|| node->force_output)