[gcc(refs/users/aoliva/heads/testme)] testsuite: riscv: reset -march for tests with -mcpu
Alexandre Oliva
aoliva@gcc.gnu.org
Sat Mar 28 08:42:21 GMT 2026
https://gcc.gnu.org/g:e5c5d119d7e89e8ab38bcc7b697ad2c137340674
commit e5c5d119d7e89e8ab38bcc7b697ad2c137340674
Author: Alexandre Oliva <oliva@adacore.com>
Date: Tue Mar 10 04:16:03 2026 -0300
testsuite: riscv: reset -march for tests with -mcpu
The tests fail when --target_board sets -march to a 32-bit
architecture. Override that -march by resetting it, so that the arch
implied by -mcpu prevails.
for gcc/testsuite/ChangeLog
* gcc.target/riscv/pr114139.c: Reset arch.
* gcc.target/riscv/pr118170.c: Likewise.
Diff:
---
gcc/testsuite/gcc.target/riscv/pr114139.c | 2 +-
gcc/testsuite/gcc.target/riscv/pr118170.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.target/riscv/pr114139.c b/gcc/testsuite/gcc.target/riscv/pr114139.c
index 5aa587f1b6f0..a2faa680199f 100644
--- a/gcc/testsuite/gcc.target/riscv/pr114139.c
+++ b/gcc/testsuite/gcc.target/riscv/pr114139.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! riscv_abi_e } } } */
-/* { dg-options "-O2 -fpic -mexplicit-relocs -mcpu=sifive-p450 -mabi=lp64d" } */
+/* { dg-options "-O2 -fpic -mexplicit-relocs -mcpu=sifive-p450 -march=unset -mabi=lp64d" } */
static void *p;
extern void *a[];
diff --git a/gcc/testsuite/gcc.target/riscv/pr118170.c b/gcc/testsuite/gcc.target/riscv/pr118170.c
index a39c4170ff2f..7be0edcc99fa 100644
--- a/gcc/testsuite/gcc.target/riscv/pr118170.c
+++ b/gcc/testsuite/gcc.target/riscv/pr118170.c
@@ -1,5 +1,5 @@
/* { dg-do "compile" { target { ! riscv_abi_e } } } */
-/* { dg-options "-O2 -mcpu=tt-ascalon-d8 -mabi=lp64d" } */
+/* { dg-options "-O2 -mcpu=tt-ascalon-d8 -march=unset -mabi=lp64d" } */
_Float16 f;
void
More information about the Gcc-cvs
mailing list