From 229a00b22414084d522a8b69cb33168d44b54ae7 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 19 Sep 2017 10:12:35 +0200 Subject: [PATCH] Remove test failing on the branch. 2017-09-18 Martin Liska * gcc.dg/asan/pr81224.c: Remove. From-SVN: r252964 --- gcc/ChangeLog | 9 +++++++++ gcc/c-family/c-common.c | 13 ------------- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/g++.dg/other/pr81355.C | 14 -------------- 4 files changed, 17 insertions(+), 27 deletions(-) delete mode 100644 gcc/testsuite/g++.dg/other/pr81355.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a8c62ef50e5..c8e7f33eb4e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2017-09-19 Martin Liska + + Revert backport: + 2017-08-10 Martin Liska + + PR c++/81355 + * c-attribs.c (handle_target_attribute): + Report warning for an empty string argument of target attribute. + 2017-09-18 Richard Biener Backport from mainline diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 4a1c2e41f99f..4d849fc19e88 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 %"); - *no_add_attrs = true; - } - } - return NULL_TREE; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2bab3a2489de..9452ddc54da1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2017-09-19 Martin Liska + + Revert backport: + 2017-08-10 Martin Liska + + PR c++/81355 + * g++.dg/other/pr81355.C: New test. + 2017-09-18 Richard Biener 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 89d1b4195814..000000000000 --- 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(); -} -- 2.47.2