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 gdb/31015] [gdb, ppc64le] FAIL: gdb.ada/array_return.exp: value printed by finish of Create_Small_Float_Vector
Date: Tue, 31 Oct 2023 15:32:10 +0000	[thread overview]
Message-ID: <bug-31015-4717-3hfwgmvexs@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31015-4717@http.sourceware.org/bugzilla/>

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 20e732ff162..494c3e3df17 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -1127,7 +1127,10 @@ ppc64_aggregate_candidate (struct type *type,

          if (!get_array_bounds (type, &low_bound, &high_bound))
            return -1;
-         count *= high_bound - low_bound;
+         LONGEST nr_array_elements = (low_bound > high_bound ?
+                                      0
+                                      : (high_bound - low_bound + 1));
+         count *= nr_array_elements;

          /* There must be no padding.  */
          if (count == 0)
...

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

  reply	other threads:[~2023-10-31 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31  9:37 [Bug gdb/31015] New: " vries at gcc dot gnu.org
2023-10-31 15:32 ` vries at gcc dot gnu.org [this message]
2023-10-31 15:35 ` [Bug tdep/31015] " vries at gcc dot gnu.org
2023-11-01  7:49 ` vries at gcc dot gnu.org
2023-11-02 18:04 ` cvs-commit at gcc dot gnu.org
2023-11-02 18:07 ` 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-31015-4717-3hfwgmvexs@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).