On rv32gcv testcases like g++.target/riscv/rvv/base/bug-22.C fail with: FAIL: g++.target/riscv/rvv/base/bug-22.C (test for excess errors) Excess errors: cc1plus: error: ABI requires '-march=rv32'
This patch adds the -mabi argument to g++ rvv tests. gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/rvv.exp: Add -mabi argument to CFLAGS. Signed-off-by: Patrick O'Neill <patr...@rivosinc.com> --- Resolved failures: FAIL: g++.target/riscv/rvv/base/bug-18.C (test for excess errors) FAIL: g++.target/riscv/rvv/base/bug-19.C (test for excess errors) FAIL: g++.target/riscv/rvv/base/bug-20.C (test for excess errors) FAIL: g++.target/riscv/rvv/base/bug-21.C (test for excess errors) FAIL: g++.target/riscv/rvv/base/bug-22.C (test for excess errors) --- gcc/testsuite/g++.target/riscv/rvv/rvv.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.target/riscv/rvv/rvv.exp b/gcc/testsuite/g++.target/riscv/rvv/rvv.exp index c30d6e93144..5b01e4e05d2 100644 --- a/gcc/testsuite/g++.target/riscv/rvv/rvv.exp +++ b/gcc/testsuite/g++.target/riscv/rvv/rvv.exp @@ -28,15 +28,17 @@ if ![istarget riscv*-*-*] then { load_lib g++-dg.exp set gcc_march "rv64gcv_zfh" +set gcc_mabi "lp64d" if [istarget riscv32-*-*] then { set gcc_march "rv32gcv_zfh" + set gcc_mabi "ilp32d" } # Initialize `dg'. dg-init # Main loop. -set CFLAGS "-march=$gcc_march -O3" +set CFLAGS "-march=$gcc_march -mabi=$gcc_mabi -O3" dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/base/*.C]] \ "" $CFLAGS -- 2.34.1