diff --git a/gcc/symtab.c b/gcc/symtab.c index 8c4cb70b015..c7ea8ecef74 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(); +}