summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/arrayptr.exp
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-02-28 13:42:03 -0700
committerTom Tromey <tromey@adacore.com>2022-03-07 07:57:09 -0700
commit47a39c6e18324360b3ef9b72f03e206417f2ce9c (patch)
treece89d520a8f779223f3eb84cd69335e4fc1a5aa6 /gdb/testsuite/gdb.ada/arrayptr.exp
parent315e4ebb4b7ef01da2f5c419edc74f39a0122d20 (diff)
downloadbinutils-gdb-47a39c6e18324360b3ef9b72f03e206417f2ce9c.tar.gz
Fix gdb.ada/arrayptr.exp results
PR ada/28115 points out that gdb.ada/arrayptr.exp works with GNAT 12, but fails with minimal encodings in earlier versions. This patch updates the test to try to report the results correctly. I tried this with the Fedora 34 system gcc (GCC 11) and with a GCC 12 built from git trunk sometime relatively recently. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28115
Diffstat (limited to 'gdb/testsuite/gdb.ada/arrayptr.exp')
-rw-r--r--gdb/testsuite/gdb.ada/arrayptr.exp37
1 files changed, 13 insertions, 24 deletions
diff --git a/gdb/testsuite/gdb.ada/arrayptr.exp b/gdb/testsuite/gdb.ada/arrayptr.exp
index 0e188bf9943..23e89759666 100644
--- a/gdb/testsuite/gdb.ada/arrayptr.exp
+++ b/gdb/testsuite/gdb.ada/arrayptr.exp
@@ -54,33 +54,22 @@ foreach_with_prefix scenario {all minimal} {
set kfail_packed_array_range_re \
"cannot subscript or call something of type `foo__packed_array_ptr'"
- gdb_test_multiple "print pa_ptr.all" "" {
- -re -wrap " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)" {
- pass $gdb_test_name
- }
- -re -wrap $kfail_int128support_re {
- kfail gdb/20991 $gdb_test_name
- }
+ # GNAT >= 12.0 has the needed fix here.
+ if {$scenario == "minimal" && ![test_compiler_info {gcc-1[2-9]-*}]} {
+ setup_kfail "minimal encodings" *-*-*
}
+ gdb_test "print pa_ptr.all" \
+ " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)"
- gdb_test_multiple "print pa_ptr(3)" "" {
- -re -wrap " = 30" {
- pass $gdb_test_name
- }
- -re -wrap $kfail_int128support_re {
- kfail gdb/20991 $gdb_test_name
- }
- -re -wrap $kfail_packed_array_range_re {
- kfail gdb/28115 $gdb_test_name
- }
+ # GNAT >= 12.0 has the needed fix here.
+ if {$scenario == "minimal" && ![test_compiler_info {gcc-1[2-9]-*}]} {
+ setup_kfail "minimal encodings" *-*-*
}
+ gdb_test "print pa_ptr(3)" " = 30"
- gdb_test_multiple "print pa_ptr.all(3)" "" {
- -re -wrap " = 30" {
- pass $gdb_test_name
- }
- -re -wrap $kfail_int128support_re {
- kfail gdb/20991 $gdb_test_name
- }
+ # GNAT >= 12.0 has the needed fix here.
+ if {$scenario == "minimal" && ![test_compiler_info {gcc-1[2-9]-*}]} {
+ setup_kfail "minimal encodings" *-*-*
}
+ gdb_test "print pa_ptr.all(3)" " = 30"
}