https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101354
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
OTOH decl-attributes.c has generic code doing
/* A "naked" function attribute implies "noinline" and "noclone" for
those targets that support it. */
if (TREE_CODE (*node) == FUNCTION_DECL
&& attributes
&& lookup_attribute ("naked", attributes) != NULL
&& lookup_attribute_spec (get_identifier ("naked")))
{
if (lookup_attribute ("noinline", attributes) == NULL)
attributes = tree_cons (get_identifier ("noinline"), NULL, attributes);
if (lookup_attribute ("noclone", attributes) == NULL)
attributes = tree_cons (get_identifier ("noclone"), NULL, attributes);
}
maybe we should simply add "noipa" and eventually also "used" to it ... (if
that's enough)