Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [committed][gdb/testsuite] Add xfail for PR gcc/101643
Date: Tue, 27 Jul 2021 17:04:59 +0200	[thread overview]
Message-ID: <20210727150457.GA18361@delia> (raw)

Hi,

With gcc 8.5.0 I run into:
...
(gdb) print bad^M
$2 = (0 => 0 <repeats 25 times>)^M
(gdb) FAIL: gdb.ada/big_packed_array.exp: scenario=minimal: print bad
...
while with gcc 9.3.1 we have instead:
...
(gdb) print bad^M
$2 = (false <repeats 196 times>)^M
(gdb) PASS: gdb.ada/big_packed_array.exp: scenario=minimal: print bad
...

This is caused by gcc PR, which I've filed at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101643 "[debug, ada] packed array
not described as packed".

Fix by marking this as XFAIL.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Add xfail for PR gcc/101643

gdb/ChangeLog:

2021-07-27  Tom de Vries  <tdevries@suse.de>

	PR testsuite/26904
	* gdb/testsuite/gdb.ada/big_packed_array.exp: Add xfail.

---
 gdb/testsuite/gdb.ada/big_packed_array.exp | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/big_packed_array.exp b/gdb/testsuite/gdb.ada/big_packed_array.exp
index 95cd7ebcc1d..32ff0dd3e1c 100644
--- a/gdb/testsuite/gdb.ada/big_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/big_packed_array.exp
@@ -19,6 +19,11 @@ if { [skip_ada_tests] } { return -1 }
 
 standard_ada_testfile foo_ra24_010
 
+if [get_compiler_info] {
+    return -1
+}
+set old_gcc [expr [test_compiler_info {gcc-[0-8]-*}]]
+
 foreach_with_prefix scenario {all minimal} {
     set flags [list debug additional_flags=-fgnat-encodings=$scenario]
 
@@ -34,6 +39,20 @@ foreach_with_prefix scenario {all minimal} {
     gdb_test "print good" \
 	"= \\(false <repeats 196 times>\\)" \
 
-    gdb_test "print bad" \
-	"= \\(false <repeats 196 times>\\)"
+    set have_xfail [expr $old_gcc && [string equal "$scenario" "minimal"]]
+
+    set re "= \\(false <repeats 196 times>\\)"
+    set re_xfail "= \\(0 => 0 <repeats 25 times>\\)"
+    gdb_test_multiple "print bad" "" {
+       -re -wrap $re  {
+           pass $gdb_test_name
+       }
+       -re -wrap $re_xfail {
+           if { $have_xfail } {
+               # gcc/101643
+               setup_xfail *-*-*
+           }
+           fail $gdb_test_name
+       }
+    }
 }

                 reply	other threads:[~2021-07-27 15:05 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=20210727150457.GA18361@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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