The original method tried to overwrite the march option when the target doesn't support v exctension, which caused unexpected compile and runtime test failures
This patch change the way to handle targets that don't support v extension by simply skip the test cases that requires v extension The test cases under g[cc|++].dg/vect/vect.exp will be skipped on rv64gc after this patch gcc/testsuite/ChangeLog: * lib/target-supports.exp: skip vector tests if target not supporting v extension Signed-off-by: Jerry Zhang Jian <jerry.zhangj...@sifive.com> --- gcc/testsuite/lib/target-supports.exp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index f001c28072f..71d7e569a7d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -11807,10 +11807,7 @@ proc check_vect_support_and_set_flags { } { lappend DEFAULT_VECTCFLAGS "-mno-vector-strict-align" } } else { - foreach item [add_options_for_riscv_v ""] { - lappend DEFAULT_VECTCFLAGS $item - } - set dg-do-what-default compile + return 0 } } elseif [istarget loongarch*-*-*] { # Set the default vectorization option to "-mlsx" due to the problem -- 2.45.2