https://gcc.gnu.org/g:cfa3f1e38baa7ac76257d85f7402cc33fd281137

commit cfa3f1e38baa7ac76257d85f7402cc33fd281137
Author: Alexandre Oliva <[email protected]>
Date:   Fri Feb 6 13:42:44 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

Reply via email to