public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4503] target: Support whitespaces in target attr/pragma.
@ 2021-10-19 12:39 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-10-19 12:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6b34f5c5ec75823d656b6882f12d46248402a2aa

commit r12-4503-g6b34f5c5ec75823d656b6882f12d46248402a2aa
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..fdf341812f4 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -17633,6 +17633,7 @@ aarch64_process_one_target_attr (char *arg_str)
 
   char *str_to_check = (char *) alloca (len + 1);
   strcpy (str_to_check, arg_str);
+  str_to_check = strip_whitespaces (str_to_check, &len);
 
   /* We have something like __attribute__ ((target ("+fp+nosimd"))).
      It is easier to detect and handle it explicitly here rather than going
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 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 12:39 [gcc r12-4503] 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).