From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] [gdb/testsuite] Fix gdb.fortran/array-bounds.exp on arm
Date: Fri, 7 Jun 2024 08:13:42 +0200 [thread overview]
Message-ID: <2dfeefd0-ba24-43ef-8dab-bc990752b735@suse.de> (raw)
In-Reply-To: <20240527032944.19208-3-tdevries@suse.de>
On 5/27/24 05:29, Tom de Vries wrote:
> When running test-case gdb.fortran/array-bounds.exp on arm-linux, we run into:
> ...
> (gdb) print &foo^M
> $1 = (PTR TO -> ( real(kind=4) (0:1) )) 0xfffef008^M
> (gdb) FAIL: gdb.fortran/array-bounds.exp: print &foo
> print &bar^M
> $2 = (PTR TO -> ( real(kind=4) (-1:0) )) 0xfffef010^M
> (gdb) FAIL: gdb.fortran/array-bounds.exp: print &bar
> ...
>
> This is due to gcc PR debug/54934.
>
> The test-case contains a kfail for this, which is only activated for
> x86_64/i386.
>
> Fix this by enabling the kfail for all ilp32 targets.
>
> Also:
> - change the kfail into an xfail, because gdb is not at fault here, and
> - limit the xfail to the gfortran compiler.
>
> Tested on arm-linux.
Pushed.
Thanks,
- Tom
> ---
> gdb/testsuite/gdb.fortran/array-bounds.exp | 45 +++++++++++++++-------
> 1 file changed, 31 insertions(+), 14 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.fortran/array-bounds.exp b/gdb/testsuite/gdb.fortran/array-bounds.exp
> index f09eda9d646..46ee614a37f 100644
> --- a/gdb/testsuite/gdb.fortran/array-bounds.exp
> +++ b/gdb/testsuite/gdb.fortran/array-bounds.exp
> @@ -31,21 +31,38 @@ if {![fortran_runto_main]} {
> return
> }
>
> -# Convenience proc to setup for KFAIL
> -proc kfail_if {exp bugid triplet} {
> - if {$exp} {
> - setup_kfail $bugid $triplet
> +# GCC outputs incorrect range debug info for -m32, gcc PR debug/54934.
> +set expect_xfail \
> + [expr \
> + [test_compiler_info {gfortran-*} f90] \
> + && [is_ilp32_target]]
> +
> +set re_ok [string_to_regexp (4294967296:4294967297)]
> +set re_xfail [string_to_regexp (0:1)]
> +gdb_test_multiple "print &foo" "" {
> + -re -wrap $re_ok.* {
> + pass $gdb_test_name
> + }
> + -re -wrap $re_xfail.* {
> + if { $expect_xfail } {
> + xfail $gdb_test_name
> + } else {
> + fail $gdb_test_name
> + }
> }
> }
>
> -# GCC outputs incorrect range debug info for -m32.
> -set expect_fail false
> -if {[is_ilp32_target] && ([istarget "i\[34567\]86-*-linux*"]
> - || [istarget "x86_64-*-linux*"])} {
> - set expect_fail true
> +set re_ok [string_to_regexp (-4294967297:-4294967296)]
> +set re_xfail [string_to_regexp (-1:0)]
> +gdb_test_multiple "print &bar" "" {
> + -re -wrap $re_ok.* {
> + pass $gdb_test_name
> + }
> + -re -wrap $re_xfail.* {
> + if { $expect_xfail } {
> + xfail $gdb_test_name
> + } else {
> + fail $gdb_test_name
> + }
> + }
> }
> -
> -kfail_if $expect_fail "gcc/54934" "*-*-*"
> -gdb_test "print &foo" {.*\(4294967296:4294967297\).*}
> -kfail_if $expect_fail "gcc/54934" "*-*-*"
> -gdb_test "print &bar" {.*\(-4294967297:-4294967296\).*}
next prev parent reply other threads:[~2024-06-07 6:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 3:29 [PATCH 1/3] [gdb/exp] Fix target type of complex long double " Tom de Vries
2024-05-27 3:29 ` [PATCH 2/3] [gdb/exp] Fix gdb.fortran/intrinsics.exp fail " Tom de Vries
2024-06-11 8:51 ` Tom de Vries
2024-06-13 9:14 ` Tom de Vries
2024-05-27 3:29 ` [PATCH 3/3] [gdb/testsuite] Fix gdb.fortran/array-bounds.exp " Tom de Vries
2024-06-07 6:13 ` Tom de Vries [this message]
2024-05-28 15:11 ` [PATCH 1/3] [gdb/exp] Fix target type of complex long double " Tom Tromey
2024-05-29 11:44 ` Tom de Vries
2024-06-03 14:37 ` Tom Tromey
2024-06-07 13:36 ` Tom de Vries
2024-06-19 15:42 ` Tom de Vries
2024-06-03 14:52 ` Luis Machado
2024-06-03 15:04 ` Tom de Vries
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=2dfeefd0-ba24-43ef-8dab-bc990752b735@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@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).