public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jiawei <jiawei@iscas.ac.cn>
To: gcc-patches@gcc.gnu.org
Cc: kito.cheng@sifive.com, palmer@dabbelt.com,
	christoph.muellner@vrull.eu, jeremy.bennett@embecosm.com,
	mary.bennett@embecosm.com, nandni.jamnadas@embecosm.com,
	charlie.keaney@embecosm.com, simon.cook@embecosm.com,
	tariq.kurd@codasip.com, ibrahim.abu.kharmeh1@huawei.com,
	gaofei@eswincomputing.com, sinan.lin@linux.alibaba.com,
	wuwei2016@iscas.ac.cn, shihua@iscas.ac.cn, shiyulong@iscas.ac.cn,
	chenyixuan@iscas.ac.cn, Jiawei <jiawei@iscas.ac.cn>
Subject: [PATCH v2 3/3] RISC-V: Add ZC* test for failed march args being passed.
Date: Wed,  7 Jun 2023 20:56:41 +0800	[thread overview]
Message-ID: <20230607125641.727633-4-jiawei@iscas.ac.cn> (raw)
In-Reply-To: <20230607125641.727633-1-jiawei@iscas.ac.cn>

Add ZC* extensions march args tests for error input cases.

Co-Authored by: Nandni Jamnadas <nandni.jamnadas@embecosm.com>
Co-Authored by: Jiawei <jiawei@iscas.ac.cn>
Co-Authored by: Mary Bennett <mary.bennett@embecosm.com>
Co-Authored by: Simon Cook <simon.cook@embecosm.com>

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/arch-22.c: New test.
        * gcc.target/riscv/arch-23.c: New test.

---
 gcc/testsuite/gcc.target/riscv/arch-22.c | 5 +++++
 gcc/testsuite/gcc.target/riscv/arch-23.c | 5 +++++
 2 files changed, 10 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/riscv/arch-22.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/arch-23.c

diff --git a/gcc/testsuite/gcc.target/riscv/arch-22.c b/gcc/testsuite/gcc.target/riscv/arch-22.c
new file mode 100644
index 00000000000..3be4ade65a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/arch-22.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64i_zcf -mabi=lp64" } */
+int foo() {}
+/* { dg-error "'-march=rv64i_zcf': zcf extension supports in rv32 only" "" { target *-*-* } 0 } */
+/* { dg-error "'-march=rv64i_zca_zcf': zcf extension supports in rv32 only" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.target/riscv/arch-23.c b/gcc/testsuite/gcc.target/riscv/arch-23.c
new file mode 100644
index 00000000000..cecce06e474
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/arch-23.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64if_zce -mabi=lp64" } */
+int foo() {}
+/* { dg-error "'-march=rv64if_zce': zcf extension supports in rv32 only" "" { target *-*-* } 0 } */
+/* { dg-error "'-march=rv64if_zca_zcb_zce_zcf_zcmp_zcmt': zcf extension supports in rv32 only" "" { target *-*-* } 0 } */
-- 
2.25.1


  parent reply	other threads:[~2023-06-07 12:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 12:56 [PATCH v2 0/3] RISC-V: Support ZC* extensions Jiawei
2023-06-07 12:56 ` [PATCH v2 1/3] RISC-V: Minimal support for " Jiawei
2023-06-07 12:56 ` [PATCH v2 2/3] RISC-V: Enable compressible features when use " Jiawei
2023-06-07 12:56 ` Jiawei [this message]
2023-06-07 14:27 ` [PATCH v2 0/3] RISC-V: Support " Kito Cheng
2023-08-14 14:12   ` Kito Cheng

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=20230607125641.727633-4-jiawei@iscas.ac.cn \
    --to=jiawei@iscas.ac.cn \
    --cc=charlie.keaney@embecosm.com \
    --cc=chenyixuan@iscas.ac.cn \
    --cc=christoph.muellner@vrull.eu \
    --cc=gaofei@eswincomputing.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ibrahim.abu.kharmeh1@huawei.com \
    --cc=jeremy.bennett@embecosm.com \
    --cc=kito.cheng@sifive.com \
    --cc=mary.bennett@embecosm.com \
    --cc=nandni.jamnadas@embecosm.com \
    --cc=palmer@dabbelt.com \
    --cc=shihua@iscas.ac.cn \
    --cc=shiyulong@iscas.ac.cn \
    --cc=simon.cook@embecosm.com \
    --cc=sinan.lin@linux.alibaba.com \
    --cc=tariq.kurd@codasip.com \
    --cc=wuwei2016@iscas.ac.cn \
    /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: link
Be 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).