From c9945504c9d6e69b961da97948a5b7e40404f10b Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 21 Apr 2010 16:41:03 +0200 Subject: 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 --- gcc/varpool.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/varpool.c') diff --git a/gcc/varpool.c b/gcc/varpool.c index a13742d..40decfc 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) -- cgit v1.1