https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69077
--- Comment #15 from rguenther at suse dot de <rguenther at suse dot de> --- On Mon, 11 Jan 2016, hubicka at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69077 > > --- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> --- > I suppose the problem here is that lto-symtab is not merging symtab nodes but > only the FUNCTION_DECLs so the flag is not merged. Something like this may > help. > Index: lto-symtab.c > =================================================================== > --- lto-symtab.c (revision 232227) > +++ lto-symtab.c (working copy) > @@ -997,6 +1005,8 @@ lto_symtab_prevailing_virtual_decl (tree > n = n->next_sharing_asm_name; > if (n) > { > + DECL_POSSIBLY_INLINED (n->decl) |= DECL_POSSIBLY_INLINED (decl); > + DECL_POSSIBLY_INLINED (decl) |= DECL_POSSIBLY_INLINED (n->decl); > lto_symtab_prevail_decl (n->decl, decl); > decl = n->decl; > } Works. Testing Index: lto/lto-symtab.c =================================================================== --- lto/lto-symtab.c (revision 232261) +++ lto/lto-symtab.c (working copy) @@ -997,6 +997,18 @@ lto_symtab_prevailing_virtual_decl (tree n = n->next_sharing_asm_name; if (n) { + /* Merge decl state in both directions, we may still end up using + the other decl. */ + TREE_ADDRESSABLE (n->decl) |= TREE_ADDRESSABLE (decl); + TREE_ADDRESSABLE (decl) |= TREE_ADDRESSABLE (n->decl); + + if (TREE_CODE (decl) == FUNCTION_DECL) + { + /* Merge decl state in both directions, we may still end up using + the other decl. */ + DECL_POSSIBLY_INLINED (n->decl) |= DECL_POSSIBLY_INLINED (decl); + DECL_POSSIBLY_INLINED (decl) |= DECL_POSSIBLY_INLINED (n->decl); + } lto_symtab_prevail_decl (n->decl, decl); decl = n->decl; }