public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4503] target: Support whitespaces in target attr/pragma. Date: Tue, 19 Oct 2021 12:39:43 +0000 (GMT) [thread overview] Message-ID: <20211019123943.6A30A3858D3C@sourceware.org> (raw) 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")));
reply other threads:[~2021-10-19 12:39 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211019123943.6A30A3858D3C@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).