On Jan 31, 2026, Alexandre Oliva <[email protected]> wrote:

> Anyhow, I'll be happy to restore the preexisting options, but limit
> their use to when the Zbs extension is available in the cpu under test.

> Would you really prefer the test to be skipped altogether otherwise,

or like this?


The test wants Zbs support, but it didn't check for runtime support.

Also use rv64 and rv32 so that multilibs with different bit widths
work.


for  gcc/testsuite/ChangeLog

        * gcc.target/riscv/pr116715.c: Require Zbs support.  Select
        arch by active bitwidth.
---
 gcc/testsuite/gcc.target/riscv/pr116715.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gcc.target/riscv/pr116715.c 
b/gcc/testsuite/gcc.target/riscv/pr116715.c
index 55daab20171ec..b4f7fa71715e7 100644
--- a/gcc/testsuite/gcc.target/riscv/pr116715.c
+++ b/gcc/testsuite/gcc.target/riscv/pr116715.c
@@ -1,6 +1,6 @@
-/* { dg-do run } */
-/* { dg-options "-march=rv64gc_zbs -mabi=lp64d" { target { riscv64*-*-* } } } 
*/
-/* { dg-options "-march=rv32gc_zbs -mabi=ilp32" { target { riscv32*-*-* } } } 
*/
+/* { dg-do run { target riscv_b_ok } } */
+/* { dg-options "-march=rv64gc_zbs -mabi=lp64d" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc_zbs -mabi=ilp32" { target { rv32 } } } */
 #include <stdint-gcc.h>
 int32_t a, b;
 int32_t d;


-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to