From: Tsukasa OI <research_tra...@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