Thanks Kyrill for review. I'm pinging the patch. Martin
On 03/21/2017 10:24 AM, Kyrill Tkachov wrote: > <CC-ing aarch64 maintainers/reviewers> > > Hi Martin, > > On 13/03/17 08:25, marxin wrote: >> gcc/testsuite/ChangeLog: >> >> 2017-03-13 Martin Liska <mli...@suse.cz> >> >> * g++.dg/ext/mv8.C: Add aarch64* targets. >> >> gcc/ChangeLog: >> >> 2017-03-13 Martin Liska <mli...@suse.cz> >> >> * config/aarch64/aarch64.c (aarch64_process_target_attr): >> Show error message instead of an ICE. > > You should mention PR target/79889 in your ChangeLog >> --- >> gcc/config/aarch64/aarch64.c | 8 ++++++-- >> gcc/testsuite/g++.dg/ext/mv8.C | 2 +- >> 2 files changed, 7 insertions(+), 3 deletions(-) >> >> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c >> index a069427f576..3107d6b84bf 100644 >> --- a/gcc/config/aarch64/aarch64.c >> +++ b/gcc/config/aarch64/aarch64.c >> @@ -9533,8 +9533,12 @@ aarch64_process_target_attr (tree args, const char* >> pragma_or_attr) >> return true; >> } >> - /* We expect to find a string to parse. */ >> - gcc_assert (TREE_CODE (args) == STRING_CST); >> + >> + if (TREE_CODE (args) != STRING_CST) >> + { >> + error ("attribute %<target%> argument not a string"); >> + return false; >> + } >> > > Looks reasonable to me, but you'll need approval from the folks CC-ed. > > Thanks, > Kyrill > >> size_t len = strlen (TREE_STRING_POINTER (args)); >> char *str_to_check = (char *) alloca (len + 1); >> diff --git a/gcc/testsuite/g++.dg/ext/mv8.C b/gcc/testsuite/g++.dg/ext/mv8.C >> index bbf90b5a328..b49ef84f392 100644 >> --- a/gcc/testsuite/g++.dg/ext/mv8.C >> +++ b/gcc/testsuite/g++.dg/ext/mv8.C >> @@ -1,4 +1,4 @@ >> -// { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-* } } >> +// { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-* aarch64*-*-* } >> } >> // { dg-options "" } >> __attribute__((target (11,12))) >