From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id C68B13858032; Tue, 18 Jan 2022 12:57:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C68B13858032 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/backport-11)] ipa: "naked" attribute implies "noipa" attribute X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/backport-11 X-Git-Oldrev: 03ccfc8b9d2d42f5a1d42a1b78977a35623d9aad X-Git-Newrev: b76e938a192da0da198d2f414070182f2506508d Message-Id: <20220118125715.C68B13858032@sourceware.org> Date: Tue, 18 Jan 2022 12:57:15 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2022 12:57:15 -0000 https://gcc.gnu.org/g:b76e938a192da0da198d2f414070182f2506508d commit b76e938a192da0da198d2f414070182f2506508d Author: Martin Liska Date: Thu Aug 12 17:26:51 2021 +0200 ipa: "naked" attribute implies "noipa" attribute PR ipa/101354 gcc/ChangeLog: * attribs.c (decl_attributes): Make naked functions "noipa" functions. (cherry picked from commit 4998404915bba9cb04c438a926cdf7126782a767) Diff: --- gcc/attribs.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gcc/attribs.c b/gcc/attribs.c index ebc0783c439..47969bd7742 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -520,14 +520,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. */