public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Fix gdb.ada/arrayptr.exp results
Date: Mon,  7 Mar 2022 14:57:27 +0000 (GMT)	[thread overview]
Message-ID: <20220307145727.AD8343858C74@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=47a39c6e18324360b3ef9b72f03e206417f2ce9c

commit 47a39c6e18324360b3ef9b72f03e206417f2ce9c
Author: Tom Tromey <tromey@adacore.com>
Date:   Mon Feb 28 13:42:03 2022 -0700

    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

Diff:
---
 gdb/testsuite/gdb.ada/arrayptr.exp | 37 +++++++++++++------------------------
 1 file 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"
 }


                 reply	other threads:[~2022-03-07 14:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220307145727.AD8343858C74@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).