public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r11-8868] ipa: make target_clone default decl local [PR101726]
Date: Mon, 16 Aug 2021 11:14:42 +0000 (GMT)	[thread overview]
Message-ID: <20210816111442.7CB1C385F033@sourceware.org> (raw)

https://gcc.gnu.org/g:3d520d00ac688166f9dc4a24ad7d1ddfd686b03d

commit r11-8868-g3d520d00ac688166f9dc4a24ad7d1ddfd686b03d
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Aug 12 16:01:01 2021 +0200

    ipa: make target_clone default decl local [PR101726]
    
            PR ipa/101726
    
    gcc/ChangeLog:
    
            * multiple_target.c (create_dispatcher_calls): Make default
              function local only if it is a definition.

Diff:
---
 gcc/multiple_target.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/gcc/multiple_target.c b/gcc/multiple_target.c
index e4192657cef..6c0565880c5 100644
--- a/gcc/multiple_target.c
+++ b/gcc/multiple_target.c
@@ -170,17 +170,20 @@ create_dispatcher_calls (struct cgraph_node *node)
 				      clone_function_name_numbered (
 					  node->decl, "default"));
 
-  /* FIXME: copy of cgraph_node::make_local that should be cleaned up
-	    in next stage1.  */
-  node->make_decl_local ();
-  node->set_section (NULL);
-  node->set_comdat_group (NULL);
-  node->externally_visible = false;
-  node->forced_by_abi = false;
-  node->set_section (NULL);
-
-  DECL_ARTIFICIAL (node->decl) = 1;
-  node->force_output = true;
+  if (node->definition)
+    {
+      /* FIXME: copy of cgraph_node::make_local that should be cleaned up
+		in next stage1.  */
+      node->make_decl_local ();
+      node->set_section (NULL);
+      node->set_comdat_group (NULL);
+      node->externally_visible = false;
+      node->forced_by_abi = false;
+      node->set_section (NULL);
+
+      DECL_ARTIFICIAL (node->decl) = 1;
+      node->force_output = true;
+    }
 }
 
 /* Return length of attribute names string,


                 reply	other threads:[~2021-08-16 11:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210816111442.7CB1C385F033@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).