aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-12-02 15:49:37 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-12-02 15:49:37 +0000
commita296a0109b718272cf6fc578e9b631f82103c558 (patch)
tree54d035f31c6e4e295820170a81553b7d472b3960 /gcc/ipa.c
parenta46cde680750f08984a35106e74d415a50e82991 (diff)
downloadgcc-a296a0109b718272cf6fc578e9b631f82103c558.zip
gcc-a296a0109b718272cf6fc578e9b631f82103c558.tar.gz
gcc-a296a0109b718272cf6fc578e9b631f82103c558.tar.bz2
re PR lto/47259 (LTO and global register variable)
2011-12-02 Richard Guenther <rguenther@suse.de> PR lto/47259 * ipa.c (varpool_externally_visible_p): Register variables are always externally visible. From-SVN: r181927
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 2f79846..388291a 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -662,6 +662,8 @@ varpool_externally_visible_p (struct varpool_node *vnode, bool aliased)
if (varpool_used_from_object_file_p (vnode))
return true;
+ if (DECL_HARD_REGISTER (vnode->decl))
+ return true;
if (DECL_PRESERVE_P (vnode->decl))
return true;
if (lookup_attribute ("externally_visible",