Strip target_clones in copy attribute (PR lto/90500).
2019-05-22 Martin Liska <mliska@suse.cz>
PR lto/90500
* c-attribs.c (handle_copy_attribute): Do not copy
target_clones attribute.
2019-05-22 Martin Liska <mliska@suse.cz>
PR lto/90500
* gcc.target/i386/pr90500-1.c: Make the test-case valid
now.
2019-05-22 Martin Liska <mliska@suse.cz>
PR lto/90500
* doc/extend.texi: Document the change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271504 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ff5ffdd..d31ac86 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-05-22 Martin Liska <mliska@suse.cz>
+
+ PR lto/90500
+ * doc/extend.texi: Document the change.
+
2019-05-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/90450
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 71cb361..ae990fe 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2019-05-22 Martin Liska <mliska@suse.cz>
+
+ PR lto/90500
+ * c-attribs.c (handle_copy_attribute): Do not copy
+ target_clones attribute.
+
2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c
index 0320347..517b7e0 100644
--- a/gcc/c-family/c-attribs.c
+++ b/gcc/c-family/c-attribs.c
@@ -2486,7 +2486,8 @@
|| is_attribute_p ("noinline", atname)
|| is_attribute_p ("visibility", atname)
|| is_attribute_p ("weak", atname)
- || is_attribute_p ("weakref", atname))
+ || is_attribute_p ("weakref", atname)
+ || is_attribute_p ("target_clones", atname))
continue;
/* Attribute leaf only applies to extern functions.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e8563fd..7819766 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2749,7 +2749,8 @@
The @code{copy} attribute copies only syntactic and semantic attributes
but not attributes that affect a symbol's linkage or visibility such as
@code{alias}, @code{visibility}, or @code{weak}. The @code{deprecated}
-attribute is also not copied. @xref{Common Type Attributes}.
+and @code{target_clones} attribute are also not copied.
+@xref{Common Type Attributes}.
@xref{Common Variable Attributes}.
For example, the @var{StrongAlias} macro below makes use of the @code{alias}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5fbb80c..270b54f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2019-05-22 Martin Liska <mliska@suse.cz>
+
+ PR lto/90500
+ * gcc.target/i386/pr90500-1.c: Make the test-case valid
+ now.
+
2019-05-22 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/ssa-lim-13.c: New testcase.
diff --git a/gcc/testsuite/gcc.target/i386/pr90500-1.c b/gcc/testsuite/gcc.target/i386/pr90500-1.c
index e90e5ed..4282a3e 100644
--- a/gcc/testsuite/gcc.target/i386/pr90500-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr90500-1.c
@@ -3,6 +3,5 @@
/* { dg-require-ifunc "" } */
__attribute__((target_clones("arch=haswell", "default"))) int __tanh() {}
-__typeof(__tanh) tanhf64 __attribute__((alias("__tanh")))/* { dg-error "clones for .target_clones. attribute cannot be created" } */
- /* { dg-message "'target_clones' cannot be combined with 'alias' attribute" "" { target *-*-* } .-1 } */
+__typeof(__tanh) tanhf64 __attribute__((alias("__tanh")))
__attribute__((__copy__(__tanh)));