From 8b0662254cdac3e0b670c1c54752e1d43113b0f4 Mon Sep 17 00:00:00 2001 From: Tsukasa OI Date: Fri, 11 Aug 2023 06:09:34 +0000 Subject: RISC-V: Make PR 102957 tests more comprehensive 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 (limited to 'gcc') 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 0000000..fe62414 --- /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() +{ +} -- cgit v1.1