public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/backport-11)] ipa: do not make localaliases for target_clones [PR101261]
@ 2021-08-16 8:24 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-08-16 8:24 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:fbe246620e2fa5b5968718837ae4c12fdb85ba39
commit fbe246620e2fa5b5968718837ae4c12fdb85ba39
Author: Martin Liska <mliska@suse.cz>
Date: Fri Aug 13 11:10:56 2021 +0200
ipa: do not make localaliases for target_clones [PR101261]
PR ipa/101261
gcc/ChangeLog:
* symtab.c (symtab_node::noninterposable_alias): Do not create
local aliases for target_clone functions as the clonning pass
rejects aliases.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr101261.c: New test.
Diff:
---
gcc/symtab.c | 2 ++
gcc/testsuite/gcc.target/i386/pr101261.c | 11 +++++++++++
2 files changed, 13 insertions(+)
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 2135b34ce27..5530a124a9d 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -1959,6 +1959,8 @@ symtab_node::noninterposable_alias (void)
/* If aliases aren't supported by the assembler, fail. */
if (!TARGET_SUPPORTS_ALIASES)
return NULL;
+ else if (lookup_attribute ("target_clones", DECL_ATTRIBUTES (node->decl)))
+ return NULL;
/* Otherwise create a new one. */
new_decl = copy_node (node->decl);
diff --git a/gcc/testsuite/gcc.target/i386/pr101261.c b/gcc/testsuite/gcc.target/i386/pr101261.c
new file mode 100644
index 00000000000..d25d1a202c2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr101261.c
@@ -0,0 +1,11 @@
+/* PR middle-end/101261 */
+/* { dg-do compile { target fpic } } */
+/* { dg-options "-fno-semantic-interposition -fPIC" } */
+/* { dg-require-ifunc "" } */
+
+void
+__attribute__((target_clones("default", "avx2")))
+dt_ioppr_transform_image_colorspace()
+{
+ dt_ioppr_transform_image_colorspace();
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-16 8:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 8:24 [gcc(refs/users/marxin/heads/backport-11)] ipa: do not make localaliases for target_clones [PR101261] Martin Liska
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).