public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Andreas Krebbel <krebbel@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-858] IBM Z: Support vector _Bool language extension Date: Tue, 18 May 2021 06:56:05 +0000 (GMT) [thread overview] Message-ID: <20210518065605.E479E3844023@sourceware.org> (raw) https://gcc.gnu.org/g:7e75d62442fc3707c96c53d22f6c185fdf893c72 commit r12-858-g7e75d62442fc3707c96c53d22f6c185fdf893c72 Author: Andreas Krebbel <krebbel@linux.ibm.com> Date: Tue May 18 08:51:08 2021 +0200 IBM Z: Support vector _Bool language extension _Bool needs to be defined as macro in order to trigger the context-sensitive macro expansion mechanism. gcc/ChangeLog: * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Define _Bool as macro expanding to _Bool. gcc/testsuite/ChangeLog: * gcc.target/s390/zvector/vec-_Bool.c: New test. Diff: --- gcc/config/s390/s390-c.c | 2 ++ gcc/testsuite/gcc.target/s390/zvector/vec-_Bool.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/gcc/config/s390/s390-c.c b/gcc/config/s390/s390-c.c index 7dbd8bf5da3..4cce2619ce4 100644 --- a/gcc/config/s390/s390-c.c +++ b/gcc/config/s390/s390-c.c @@ -367,6 +367,8 @@ s390_cpu_cpp_builtins_internal (cpp_reader *pfile, old_opts, opts, "vector=vector", "vector"); s390_def_or_undef_macro (pfile, target_flag_set_p (MASK_ZVECTOR), old_opts, opts, "bool=bool", "bool"); + s390_def_or_undef_macro (pfile, target_flag_set_p (MASK_ZVECTOR), + old_opts, opts, "_Bool=_Bool", "_Bool"); if (TARGET_ZVECTOR_P (opts->x_target_flags) && __vector_keyword == NULL) { __vector_keyword = get_identifier ("__vector"); diff --git a/gcc/testsuite/gcc.target/s390/zvector/vec-_Bool.c b/gcc/testsuite/gcc.target/s390/zvector/vec-_Bool.c new file mode 100644 index 00000000000..525b950253c --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/zvector/vec-_Bool.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-march=z13 -mzvector" } */ + +vector _Bool char bc; +vector _Bool short int bs; +vector _Bool int bi; +vector _Bool long long bll;
reply other threads:[~2021-05-18 6:56 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=20210518065605.E479E3844023@sourceware.org \ --to=krebbel@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).