]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: riscv: reset -march for tests with -mcpu
authorAlexandre Oliva <oliva@adacore.com>
Tue, 12 May 2026 06:29:10 +0000 (03:29 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Tue, 12 May 2026 06:29:10 +0000 (03:29 -0300)
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.

gcc/testsuite/gcc.target/riscv/pr114139.c
gcc/testsuite/gcc.target/riscv/pr118170.c

index 5aa587f1b6f0ff9d8f9ec3887d176dff046bf6dd..a2faa680199fdb50f587ce764a1b6659257ce25b 100644 (file)
@@ -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[];
index a39c4170ff2f5b20249442f332dda05055d519ab..7be0edcc99fad5607f3430af8750c6b08991a8fd 100644 (file)
@@ -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