Strip target_clones in copy attribute (PR lto/90500).
authorMartin Liska <mliska@suse.cz>
Wed, 22 May 2019 07:45:17 +0000 (09:45 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 22 May 2019 07:45:17 +0000 (07:45 +0000)
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

gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr90500-1.c

index ff5ffdd..d31ac86 100644 (file)
@@ -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
index 71cb361..ae990fe 100644 (file)
@@ -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.
index 0320347..517b7e0 100644 (file)
@@ -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.
index e8563fd..7819766 100644 (file)
@@ -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}
index 5fbb80c..270b54f 100644 (file)
@@ -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.
index e90e5ed..4282a3e 100644 (file)
@@ -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)));