aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2025-02-12 09:35:26 -0700
committerTom Tromey <tromey@adacore.com>2025-03-04 07:42:53 -0700
commitbe382ece165eefa3e65f61bfb6b2aa2ee95dd6b4 (patch)
tree489d9d9f4364338811cb8256b006bd07375dafa4 /gdb/testsuite
parentcf3825777802a65f5476ff2652dc1c1c26e6728a (diff)
downloadbinutils-be382ece165eefa3e65f61bfb6b2aa2ee95dd6b4.zip
binutils-be382ece165eefa3e65f61bfb6b2aa2ee95dd6b4.tar.gz
binutils-be382ece165eefa3e65f61bfb6b2aa2ee95dd6b4.tar.bz2
Check for compiler support in scalar_storage.exp
gnat-llvm does not currently handle Scalar_Storage_Order. This patch changes the scalar_storage.exp test to check the compiler error messages and report "unsupported" in this case. This way, the test ought to start working automatically if this feature is added to gnat-llvm.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.ada/scalar_storage.exp16
1 files changed, 14 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.ada/scalar_storage.exp b/gdb/testsuite/gdb.ada/scalar_storage.exp
index f8fc469..47de6e9 100644
--- a/gdb/testsuite/gdb.ada/scalar_storage.exp
+++ b/gdb/testsuite/gdb.ada/scalar_storage.exp
@@ -22,8 +22,20 @@ require allow_ada_tests
standard_ada_testfile storage
-if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+# Compilation here will fail with gnat-llvm, because at the moment it
+# does not support Scalar_Storage_Order. However, if that is ever
+# implemented, we want the test to start working. So, we examine the
+# output before deciding if this is a real failure.
+set output [gdb_compile_ada_1 "${srcfile}" "${binfile}" executable debug]
+if {$output != ""} {
+ if {[regexp "error: reverse storage order .* not supported by LLVM" $output]} {
+ unsupported "scalar storage order not supported"
+ } else {
+ # Otherwise issue the fail.
+ gdb_compile_test $srcfile $result
+ }
+ # Either way we're not running this test.
+ return
}
clean_restart ${testfile}