From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 841A73858C35; Tue, 31 Oct 2023 15:32:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 841A73858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1698766330; bh=S9mYo2L7Dd2L5/OFxFqZDPsMBap3j4oTlvNNWaMXQNY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HOoj2lB7r++sIPqYsWsx+Xcv5lpjwVr0qsaow/Ply1vIIyp6FmvfMXZYqYPBHQRBR y5lJ1j0kNnMaSQDJCQAHGwrKwOGyaxWVH36L6qCaXH8lTaW5YELnDMvDDoz1GwfUor VIWxVdYKQ1SMhZynt6BtVzm39ZqO47/Ovg7KrxdM= From: "vries at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31015 --- Comment #1 from Tom de Vries --- 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 *=3D high_bound - low_bound; + LONGEST nr_array_elements =3D (low_bound > high_bound ? + 0 + : (high_bound - low_bound + 1)); + count *=3D nr_array_elements; /* There must be no padding. */ if (count =3D=3D 0) ... --=20 You are receiving this mail because: You are on the CC list for the bug.=