Extension version might be different among different ISA spec version, add explicitly isa-spec version to prevent that might fail when build GCC with different default ISA version.
gcc/testsuite/ChangeLog * gcc.target/riscv/attribute-19.c: Add -misa-spec=2.2 --- gcc/testsuite/gcc.target/riscv/attribute-19.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/riscv/attribute-19.c b/gcc/testsuite/gcc.target/riscv/attribute-19.c index 18f68d98561..562f8089361 100644 --- a/gcc/testsuite/gcc.target/riscv/attribute-19.c +++ b/gcc/testsuite/gcc.target/riscv/attribute-19.c @@ -1,4 +1,4 @@ /* { dg-do compile } */ -/* { dg-options "-mriscv-attribute -march=rv64imp0p9 -mabi=lp64" } */ +/* { dg-options "-mriscv-attribute -march=rv64imp0p9 -mabi=lp64 -misa-spec=2.2" } */ int foo() {} /* { dg-final { scan-assembler ".attribute arch, \"rv64i2p0_m2p0_p0p9\"" } } */ -- 2.34.0