diff options
author | Martin Liska <mliska@suse.cz> | 2021-08-12 17:26:51 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-08-13 16:04:26 +0200 |
commit | 4998404915bba9cb04c438a926cdf7126782a767 (patch) | |
tree | ae30e935ca2f8e9fe826e3b20f401a52bf279daa /gcc | |
parent | fa28520fadb9405f4387ceb419b0b7fc3ba0a61f (diff) | |
download | gcc-4998404915bba9cb04c438a926cdf7126782a767.zip gcc-4998404915bba9cb04c438a926cdf7126782a767.tar.gz gcc-4998404915bba9cb04c438a926cdf7126782a767.tar.bz2 |
ipa: "naked" attribute implies "noipa" attribute
PR ipa/101354
gcc/ChangeLog:
* attribs.c (decl_attributes): Make naked functions "noipa"
functions.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/attribs.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c index afa485e..0d22c20 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -517,14 +517,9 @@ decl_attributes (tree *node, tree attributes, int flags, 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); - } + && lookup_attribute_spec (get_identifier ("naked")) + && lookup_attribute ("noipa", attributes) == NULL) + attributes = tree_cons (get_identifier ("noipa"), NULL, attributes); /* A "noipa" function attribute implies "noinline", "noclone" and "no_icf" for those targets that support it. */ |