public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug fortran/29053] New: [m32] FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of lbound ('array_1d_4bytes_overflow') expression
Date: Wed, 13 Apr 2022 04:19:09 +0000	[thread overview]
Message-ID: <bug-29053-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=29053

            Bug ID: 29053
           Summary: [m32] FAIL: gdb.fortran/lbound-ubound.exp: test 12:
                    check value of lbound ('array_1d_4bytes_overflow')
                    expression
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fortran
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

With target board unix/-m32, I run into:
...
FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of lbound
('array_1d_4bytes_overflow') expression
FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of ubound
('array_1d_4bytes_overflow') expression
FAIL: gdb.fortran/lbound-ubound.exp: test 12: lbounds match
FAIL: gdb.fortran/lbound-ubound.exp: test 12: ubounds match
FAIL: gdb.fortran/lbound-ubound.exp: p lbound(array_1d_4bytes_overflow, 1, 8)
...

In more detail:
...
(gdb) p lbound (array_1d_4bytes_overflow)^M
$71 = (2147483644)^M
(gdb) FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of lbound
('array_1d_4bytes_overflow') expression
p ubound (array_1d_4bytes_overflow)^M
$72 = (-2147483637)^M
(gdb) FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of ubound
('array_1d_4bytes_overflow') expression
...

With native instead I get:
...
(gdb) p lbound (array_1d_4bytes_overflow)^M
$71 = (2147483644)^M
(gdb) PASS: gdb.fortran/lbound-ubound.exp: test 12: check value of lbound
('array_1d_4bytes_overflow') expression
p ubound (array_1d_4bytes_overflow)^M
$72 = (-2147483637)^M
(gdb) PASS: gdb.fortran/lbound-ubound.exp: test 12: check value of ubound
('array_1d_4bytes_overflow') expression
...

Hmm, that's the same output, so the difference is in the expected value.  Let's
annotate that in the test name:
...
diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp
b/gdb/testsuite/gdb.fortran/lbound
-ubound.exp
index 334713666e0..f4093092a11 100644
--- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp
+++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp
@@ -137,10 +137,10 @@ while { $test_count < 500 } {
        # lower bounds for an array.
        set pattern [string_to_regexp " = $expected_lbound"]
        gdb_test "p lbound ($array_name)" "$pattern" \
-           "check value of lbound ('$array_name') expression"
+           "check value of lbound ('$array_name') expression, expected:
$expected_lbound"

        set pattern [string_to_regexp " = $expected_ubound"]
        gdb_test "p ubound ($array_name)" "$pattern" \
-           "check value of ubound ('$array_name') expression"
+           "check value of ubound ('$array_name') expression, expected:
$expected_ubound"


        # Now ask for each bound in turn and check it against the
        # expected results.
...

That's a mismatch indeed:
...
(gdb) p lbound (array_1d_4bytes_overflow)^M
$71 = (2147483644)^M
(gdb) FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of lbound
('array_1d_4bytes_overflow') expression, expected: (1)
p ubound (array_1d_4bytes_overflow)^M
$72 = (-2147483637)^M
(gdb) FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of ubound
('array_1d_4bytes_overflow') expression, expected: (0)
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-04-13  4:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13  4:19 vries at gcc dot gnu.org [this message]
2022-05-05 11:19 ` [Bug fortran/29053] " vries at gcc dot gnu.org
2022-05-10 13:34 ` nils-christian.kempke at intel dot com
2022-05-10 13:39 ` vries at gcc dot gnu.org

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=bug-29053-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).