On Wed, 15 Jun 2022 10:35:36 PDT (-0700), Vineet Gupta wrote:
Hi Wei,

On 6/8/22 02:35, jiawei wrote:
From: Jia-wei Chen <jia...@iscas.ac.cn>

In rv32 regression test, this cases will report an error:

"cc1: error: ABI requires '-march=rv32'"

Add '-mabi' option will fix this.

gcc/testsuite/ChangeLog:

         * gcc.target/riscv/pr105666.c: New options.

---
  gcc/testsuite/gcc.target/riscv/pr105666.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/riscv/pr105666.c 
b/gcc/testsuite/gcc.target/riscv/pr105666.c
index dd996eec8ef..752bbf1c017 100644
--- a/gcc/testsuite/gcc.target/riscv/pr105666.c
+++ b/gcc/testsuite/gcc.target/riscv/pr105666.c
@@ -7,7 +7,7 @@

  /* { dg-do compile } */
  /* { dg-require-effective-target hard_float } */
-/* { dg-options "-march=rv64g -ffast-math" } */
+/* { dg-options "-march=rv64g -mabi=lp64d -ffast-math" } */

  #define NITER 4
  #define NVARS 20

Thx for the fix.
I'm curious, doesn't -march imply a default ABI ? Or is there a default
ABI across both rv32 and rv64 which needs to be overridden ?

In GCC we don't change -mabi from -march, that's an LLVM-ism. There was just a patch posted, but the reviews look pretty negative so far.

Reply via email to