+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.
/* 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))