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] kfail an Ada test for GCC < 12
Date: Mon, 17 Oct 2022 19:20:41 +0000 (GMT)	[thread overview]
Message-ID: <20221017192041.9A4CB3858295@sourceware.org> (raw)

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

commit 239e440d30998da4af74095c75bdb501d3a3987d
Author: Tom Tromey <tromey@adacore.com>
Date:   Mon Oct 17 13:16:59 2022 -0600

    kfail an Ada test for GCC < 12
    
    I noticed one particular Ada test was failing on Fedora 34, but works
    when I switch to GCC 12.  This patch arranges to kfail the test when
    an older compiler is used.
    
    I tested this with GCC 11, 12, and 13.  I'm going to check it in.

Diff:
---
 gdb/testsuite/gdb.ada/packed_array_assign.exp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gdb/testsuite/gdb.ada/packed_array_assign.exp b/gdb/testsuite/gdb.ada/packed_array_assign.exp
index eef0d39b6a8..a0240fc17be 100644
--- a/gdb/testsuite/gdb.ada/packed_array_assign.exp
+++ b/gdb/testsuite/gdb.ada/packed_array_assign.exp
@@ -52,6 +52,12 @@ set re \
 	 "\\(packed_array_assign_w => 23," \
 	 "packed_array_assign_x => 7," \
 	 "packed_array_assign_y => 1\\)\\)"]
+
+# GNAT >= 12.0 has the needed fix here.
+set zeros_expected [expr {![test_compiler_info {gcc-1[2-9]-*}]}]
+set all_zeros \
+    [string_to_regexp "((packed_array_assign_w => 0, packed_array_assign_x => 0, packed_array_assign_y => 0), (packed_array_assign_w => 0, packed_array_assign_x => 0, packed_array_assign_y => 0), (packed_array_assign_w => 0, packed_array_assign_x => 0, packed_array_assign_y => 0))"]
+
 set re [join $re]
 gdb_test_multiple $cmd "value of pra" {
     -re -wrap $re {
@@ -60,6 +66,12 @@ gdb_test_multiple $cmd "value of pra" {
     -re -wrap $kfail_int128support_re {
 	kfail gdb/20991 $gdb_test_name
     }
+    -re -wrap $all_zeros {
+	if {$zeros_expected} {
+	    setup_kfail "GCC 12 needed" *-*-*
+	}
+	fail $gdb_test_name
+    }
 }
 
 set cmd "print pra(1) := pr"

                 reply	other threads:[~2022-10-17 19:20 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=20221017192041.9A4CB3858295@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).