aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-09-19 08:12:35 +0000
committerMartin Liska <mliska@suse.cz>2017-09-19 08:12:35 +0000
commitccf6ebd7101bf1386c889708a0b2939321ca66f7 (patch)
treeb50d2e58dfef143be62eb0e61c40922be5aca472
parent28011bbbf8ae5e7d32303aabd685aebd102fb534 (diff)
Remove test failing on the branch.
2017-09-18 Martin Liska <mliska@suse.cz> * gcc.dg/asan/pr81224.c: Remove. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@252964 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/c-family/c-common.c13
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/g++.dg/other/pr81355.C14
4 files changed, 17 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4a8c62ef50e..c8e7f33eb4e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2017-09-19 Martin Liska <mliska@suse.cz>
+
+ Revert backport:
+ 2017-08-10 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * c-attribs.c (handle_target_attribute):
+ Report warning for an empty string argument of target attribute.
+
2017-09-18 Richard Biener <rguenther@suse.de>
Backport from mainline
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 4a1c2e41f99..4d849fc19e8 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -9308,19 +9308,6 @@ handle_target_attribute (tree *node, tree name, tree args, int flags,
flags))
*no_add_attrs = true;
- /* Check that there's no empty string in values of the attribute. */
- for (tree t = args; t != NULL_TREE; t = TREE_CHAIN (t))
- {
- tree value = TREE_VALUE (t);
- if (TREE_CODE (value) == STRING_CST
- && TREE_STRING_LENGTH (value) == 1
- && TREE_STRING_POINTER (value)[0] == '\0')
- {
- warning (OPT_Wattributes, "empty string in attribute %<target%>");
- *no_add_attrs = true;
- }
- }
-
return NULL_TREE;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2bab3a2489d..9452ddc54da 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2017-09-19 Martin Liska <mliska@suse.cz>
+
+ Revert backport:
+ 2017-08-10 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * g++.dg/other/pr81355.C: New test.
+
2017-09-18 Richard Biener <rguenther@suse.de>
Backport from mainline
diff --git a/gcc/testsuite/g++.dg/other/pr81355.C b/gcc/testsuite/g++.dg/other/pr81355.C
deleted file mode 100644
index 89d1b419581..00000000000
--- a/gcc/testsuite/g++.dg/other/pr81355.C
+++ /dev/null
@@ -1,14 +0,0 @@
-/* { dg-do compile { target x86_64-*-* } } */
-
-__attribute__((target("default")))
-int foo() {return 1;}
-
-__attribute__((target("arch=core2", "")))
-int foo2() {return 2;} /* { dg-warning "empty string in attribute .target." } */
-
-__attribute__((target("sse4.2", "", "")))
-int foo3() {return 2;} /* { dg-warning "empty string in attribute .target." } */
-
-int main() {
- return foo() + foo2() + foo3();
-}