https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61886
--- Comment #25 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 8 Oct 2014, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61886 > > --- Comment #24 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > But is warning/error attribute the only thing on aliases that can hold extra > semantics info (now or in the future)? I'd say LTO symtab merging should > merge > what is mergeable, and should leave leave as separate decls with the same > asm-name what holds non-mergeable semantics on it. > Say, if you declare some function (or different, just with same asm name) with > warning attribute in one TU, with error attribute in another TU and without it > on another TU, IMHO those three decls shouldn't be merged together, you should > note in cgraph that you have aliases that have the same asm name but different > semantics and just ensure that you use the right cgraph nodes and decls in the > corresponding callers. Yes, I tried to fix things in this direction but failed (maybe didn't try hard enough). Basically I'd never merge decls in lto-symtab - tree merging already merges exactly equivalent function decls - but only fixup the cgraph for the tree merging that was done. Richard.