aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-05-22 09:45:17 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-05-22 07:45:17 +0000
commit6d86ddc4d64c2f81dcc62f2778796c461ca3aecb (patch)
tree230047d254178cde05eda9a39db8227ac56b8a1d
parenta8aa828b6e94aecb188786f49e8b1b7a7cfb5391 (diff)
downloadgcc-6d86ddc4d64c2f81dcc62f2778796c461ca3aecb.zip
gcc-6d86ddc4d64c2f81dcc62f2778796c461ca3aecb.tar.gz
gcc-6d86ddc4d64c2f81dcc62f2778796c461ca3aecb.tar.bz2
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. From-SVN: r271504
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-attribs.c3
-rw-r--r--gcc/doc/extend.texi3
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr90500-1.c3
6 files changed, 22 insertions, 4 deletions
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 @@ handle_copy_attribute (tree *node, tree name, tree args,
|| 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 @@ or variable) must match the kind of symbol to which the argument refers.
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)));