public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/PR102375-ws-in-target-attr)] target: Support whitespaces in target attr/pragma.
@ 2021-10-19 9:11 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-10-19 9:11 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:aaea99feb907376f6a4eb24928c83a64f671e93c
commit aaea99feb907376f6a4eb24928c83a64f671e93c
Author: Martin Liska <mliska@suse.cz>
Date: Tue Oct 19 11:11:16 2021 +0200
target: Support whitespaces in target attr/pragma.
PR target/102375
gcc/ChangeLog:
* config/aarch64/aarch64.c (aarch64_process_one_target_attr):
Strip whitespaces.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/pr102375.c: New test.
Diff:
---
gcc/config/aarch64/aarch64.c | 1 +
gcc/testsuite/gcc.target/aarch64/pr102375.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 76d99d247ae..4c3e491ab14 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -17624,6 +17624,7 @@ aarch64_process_one_target_attr (char *arg_str)
bool invert = false;
size_t len = strlen (arg_str);
+ arg_str = strip_whitespaces (arg_str, &len);
if (len == 0)
{
diff --git a/gcc/testsuite/gcc.target/aarch64/pr102375.c b/gcc/testsuite/gcc.target/aarch64/pr102375.c
new file mode 100644
index 00000000000..fa75d319b2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr102375.c
@@ -0,0 +1,4 @@
+/* PR target/102375 */
+/* { dg-do compile } */
+
+void calculate(void) __attribute__ ((target ("+sve, +sve2")));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-19 9:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 9:11 [gcc(refs/users/marxin/heads/PR102375-ws-in-target-attr)] target: Support whitespaces in target attr/pragma Martin Liska
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).