public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>,
	Kito Cheng <kito.cheng@gmail.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Andrew Waterman <andrew@sifive.com>,
	Jim Wilson <jim.wilson.gcc@gmail.com>,
	Jeff Law <jeffreyalaw@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: [PATCH v2] RISC-V: Make PR 102957 tests more comprehensive
Date: Tue, 29 Aug 2023 03:28:56 +0000	[thread overview]
Message-ID: <d496232ba289fc98cac4fd7139f50826d6969548.1693279731.git.research_trasio@irq.a4lg.com> (raw)
In-Reply-To: <3aa13843de038d960fdb3415f416243e43b376f2.1691745095.git.research_trasio@irq.a4lg.com>

From: Tsukasa OI <research_trasio@irq.a4lg.com>

Commit c283c4774d1c ("RISC-V: Throw compilation error for unknown
extensions") changed how do we handle unknown extensions and
commit 6f709f79c915a ("[committed] [RISC-V] Fix expected diagnostic messages
in testsuite") "fixed" test failures caused by that change (on pr102957.c,
by testing the error message after the first change).

However, the latter change will partially break the original intent of PR
102957 test case because we wanted to make sure that we can parse a valid
two-letter extension name.

Fortunately, there is a valid two-letter extension name, 'Zk' (standard
scalar cryptography extension superset with NIST algorithm suite).

This commit adds pr102957-2.c to make sure that there will be no errors if
we parse a valid two-letter extension name.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/pr102957-2.c: New test case using the 'Zk'
	extension to continue testing whether we can use valid two-letter
	extensions.
---
 gcc/testsuite/gcc.target/riscv/pr102957-2.c | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/riscv/pr102957-2.c

diff --git a/gcc/testsuite/gcc.target/riscv/pr102957-2.c b/gcc/testsuite/gcc.target/riscv/pr102957-2.c
new file mode 100644
index 000000000000..fe6241466354
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr102957-2.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gzk -mabi=lp64" } */
+int foo()
+{
+}

base-commit: 818cc9f2d2f3dbbd4004ff85d3125d92d1e430c9
-- 
2.42.0


  parent reply	other threads:[~2023-08-29  3:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11  9:11 [PATCH] RISC-V: Revive test case PR 102957 Tsukasa OI
2023-08-11 14:15 ` Jeff Law
2023-08-11 14:29   ` Tsukasa OI
2023-08-28 22:01     ` Jeff Law
2023-08-29  2:12       ` Tsukasa OI
2023-08-29  3:28 ` Tsukasa OI [this message]
2023-08-29 13:44   ` [PATCH v2] RISC-V: Make PR 102957 tests more comprehensive Jeff Law

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=d496232ba289fc98cac4fd7139f50826d6969548.1693279731.git.research_trasio@irq.a4lg.com \
    --to=research_trasio@irq.a4lg.com \
    --cc=andrew@sifive.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.com \
    /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).