On Thu, Dec 15, 2016 at 07:11:09PM +0100, Florian Weimer wrote: > * Jakub Jelinek: > > > + if (lookup_attribute ("used", attributes) == NULL) > > + attributes = tree_cons (get_identifier ("used"), NULL, attributes); > > Attribute “used” seems different to me from the rest. Based on the > documentation, I wouldn't expect it to have any action-at-a-distance > effect, just that an out-of-line copy is always emitted. It will > disable unused-function warnings, too, I think.
"used" means the function may be used behind compiler's back in some other ways, so it sets DECL_PRESERVE_P which causes it not to be removed as unused, but also affects various other properties we want from the noipa functions. I'll have to test whether it e.g. disables the changing of argument/return value passing (e.g. on i686 we sometimes decide to use regparm convention, that is keyed on the can_change_signature flag, I'd have to figure out if DECL_PRESERVE_P actually disables that, but if not, that would be a bug). Jakub