> @@ -811,5 +806,9 @@ lto_symtab_prevailing_decl (tree decl) > if (!ret) > return decl; > > + /* Do not replace a non-builtin with a builtin. */ > + if (is_builtin_fn (ret->decl)) > + return decl; > +
Yep, this looks like a resonable direction. It will break the one declaration rule in a more wild sense than current frontends does so, because if a builtin win as a prevailing declaration, we end up with no merging at all. I wonder if we don't want to always prevail to first non-builtin variant? (and yep, i need to push out the syntatctic aliases patch which will make duplicated decls well behaved; will try to do so soonish) Honza