diff options
author | Martin Liska <mliska@suse.cz> | 2018-04-19 10:42:52 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-04-19 08:42:52 +0000 |
commit | 1781a04fcc32c710b4bcd9080d8e1d7462ca3226 (patch) | |
tree | 3dd8c6c64b73061a726a35a2d46098b0959d0abe | |
parent | f53e7e138cf20f1a10fbcef2c14d838f494d4610 (diff) |
Do not bail out for multiple PREVAILING_DEF_IRONLY for common symbols.
2018-04-19 Martin Liska <mliska@suse.cz>
* lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
for multiple PREVAILING_DEF_IRONLY for common symbols.
From-SVN: r259490
-rw-r--r-- | gcc/lto/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto-symtab.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 3c6af8f7d16..821a462fb87 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2018-04-19 Martin Liska <mliska@suse.cz> + + * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out + for multiple PREVAILING_DEF_IRONLY for common symbols. + 2018-04-18 Martin Liska <mliska@suse.cz> * lto.c (lto_read_decls): Fix GNU coding style and typos. diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 2660542300e..3663ab7a9b2 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -466,9 +466,14 @@ lto_symtab_resolve_symbols (symtab_node *first) /* If the chain is already resolved there is nothing else to do. */ if (prevailing) { - /* Assert it's the only one. */ + /* Assert it's the only one. + GCC should silence multiple PREVAILING_DEF_IRONLY defs error + on COMMON symbols since it isn't error. + See: https://sourceware.org/bugzilla/show_bug.cgi?id=23079. */ for (e = prevailing->next_sharing_asm_name; e; e = e->next_sharing_asm_name) if (lto_symtab_symbol_p (e) + && !DECL_COMMON (prevailing->decl) + && !DECL_COMMON (e->decl) && (e->resolution == LDPR_PREVAILING_DEF_IRONLY || e->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP || e->resolution == LDPR_PREVAILING_DEF)) |