On 12/10/24 12:48 PM, Dimitar Dimitrov wrote:
On Mon, Dec 09, 2024 at 06:05:10PM +0100, Robin Dapp wrote:
+/* { dg-additional-options "-mabi=lp64d" { target { rv64 } } } */
+/* { dg-additional-options "-mabi=ilp32d" { target { rv32 } } } */
Wouldn't skipping those tests also be reasonable?
I.e. adding a target to the compile directive instead. I'd find that a bit
more intuitive than overriding the ABI.
The same might apply to the other cases you touched. In the end it's probably
a question of taste but why if your test target mandates an ABI that cannot
compile vector tests, why compile them at all?
Yes, it's perfectly reasonable to skip such tests for ILP32E default
ABI. I can prepare a patch to filter with "check_effective_target_riscv_e".
But instead of adding a new effective_target filter to hundreds of test
cases, we could simply prune the test results. Would the bellow
approach be acceptable?
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 312db38203d..ee1868e2f12 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -423,6 +423,10 @@ proc gcc-dg-prune { system text } {
return "::unsupported::memory full"
}
+ if { [regexp "(^|\n)\[^\n\]*error: ILP32E ABI does not support the \[^\n\]* extension" $text]
+ && [check_effective_target_riscv_e] } {
+ return "::unsupported::ilp32e extension"
+ }
I'd probably recommend against this. You're going to be running that
regexp hundreds of thousands of times per test run. I'd rather skip the
test or adjust the ABI over pruning.