diff mbox series

[v2] RISC-V: Make PR 102957 tests more comprehensive

Message ID d496232ba289fc98cac4fd7139f50826d6969548.1693279731.git.research_trasio@irq.a4lg.com
State New
Headers show
Series [v2] RISC-V: Make PR 102957 tests more comprehensive | expand

Commit Message

Tsukasa OI Aug. 29, 2023, 3:28 a.m. UTC
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


base-commit: 818cc9f2d2f3dbbd4004ff85d3125d92d1e430c9

Comments

Jeff Law Aug. 29, 2023, 1:44 p.m. UTC | #1
On 8/28/23 21:28, Tsukasa OI wrote:
> 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.
OK
jeff
diff mbox series

Patch

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()
+{
+}