summaryrefslogtreecommitdiff
path: root/gcc/lto-symtab.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-22 12:56:53 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-22 12:56:53 +0000
commitca3e35a1bcef5d17ca0ca9ec702aa4e91e0c7d44 (patch)
tree75a0267d14937ac168a33af993b2c8c63ed5a1d2 /gcc/lto-symtab.c
parenta96bd516338df9c61aa2692f140af6acc497eb88 (diff)
downloadgcc-ca3e35a1bcef5d17ca0ca9ec702aa4e91e0c7d44.tar.gz
2010-05-22 Richard Guenther <rguenther@suse.de>
* gimple.c (gimple_types_compatible_p): Check type qualifications before merging pointer to complete and pointer to incomplete type. * lto-symtab.c (lto_symtab_resolve_symbols): For commons make sure we use our own resolution algorithm. The gold linker plugin doesn't do the job we want it to do here. lto/ * lto.c (read_cgraph_and_symbols): Do not collect. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159696 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-symtab.c')
-rw-r--r--gcc/lto-symtab.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c
index 28e9aa3eebd..f02824d1f45 100644
--- a/gcc/lto-symtab.c
+++ b/gcc/lto-symtab.c
@@ -463,7 +463,13 @@ lto_symtab_resolve_symbols (void **slot)
if (TREE_CODE (e->decl) == FUNCTION_DECL)
e->node = cgraph_get_node (e->decl);
else if (TREE_CODE (e->decl) == VAR_DECL)
- e->vnode = varpool_get_node (e->decl);
+ {
+ e->vnode = varpool_get_node (e->decl);
+ /* The LTO plugin for gold doesn't handle common symbols
+ properly. Let us choose manually. */
+ if (DECL_COMMON (e->decl))
+ e->resolution = LDPR_UNKNOWN;
+ }
}
e = (lto_symtab_entry_t) *slot;