[PATCH] RISC-V/testsuite: Fix pr105666.c under rv32

Vineet Gupta vineetg@rivosinc.com
Wed Jun 15 17:35:36 GMT 2022


Hi Wei,

On 6/8/22 02:35, jiawei wrote:
> From: Jia-wei Chen <jiawei@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 ?

-Vineet


More information about the Gcc-patches mailing list