[committed] RISC-V: Fix testsuite

Message ID 20240108061126.792885-1-kito.cheng@sifive.com
State Unresolved
Headers
Series [committed] RISC-V: Fix testsuite |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Kito Cheng Jan. 8, 2024, 6:11 a.m. UTC
  Don't use assert, it not work well with multilib testing.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/autovec/partial/single_rgroup-3.h: Use
	check + abort rather than assert.
---
 .../riscv/rvv/autovec/partial/single_rgroup-3.h           | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-3.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-3.h
index 604e9048055..dfe48d6dae1 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-3.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-3.h
@@ -105,7 +105,9 @@  int cond[N] = {0};
           if (b_##TYPE[i] != a_##TYPE[i]) __builtin_abort();                   \
         }								       \
       else                                                                     \
-	assert (b_##TYPE[i] == 0);                                             \
+        {                                                                      \
+          if (b_##TYPE[i] != 0) __builtin_abort();                             \
+        }								       \
     }
 
 #define run_7(TYPE)                                                            \
@@ -151,7 +153,9 @@  int cond[N] = {0};
           if (b_##TYPE[i] != a_##TYPE[i]) __builtin_abort();                   \
         }								       \
       else                                                                     \
-	assert (b_##TYPE[i] == 0);                                             \
+        {                                                                      \
+          if (b_##TYPE[i] != 0) __builtin_abort();                             \
+        }								       \
     }
 
 #define run_10(TYPE)                                                           \