From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 678153858409; Wed, 13 Oct 2021 12:22:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 678153858409 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug fortran/26870] [fortran] Printing dynamic array fails Date: Wed, 13 Oct 2021 12:22:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: fortran 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2021 12:22:18 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26870 --- Comment #2 from Tom de Vries --- With gdb-11.1 we have: ... (gdb) PASS: gdb.fortran/dynamic.exp: ptype vart p varz^M $26 =3D ^M (gdb) FAIL: gdb.fortran/dynamic.exp: p varz p vart^M $27 =3D ^M (gdb) FAIL: gdb.fortran/dynamic.exp: p vart ... which means we no longer get the "warning: array or string index out of ran= ge" which is good. The error message is a bit uninformative, and could be improved using: ... diff --git a/gdb/valprint.c b/gdb/valprint.c index 324055da93f..05740c838ad 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1050,7 +1050,7 @@ do_val_print (struct value *value, struct ui_file *stream, int recurs e, catch (const gdb_exception_error &except) { fprintf_styled (stream, metadata_style.style (), - _("")); + _(""), except.what ()); } } ... to: ... (gdb) PASS: gdb.fortran/dynamic.exp: ptype vart p varz^M $26 =3D ^M (gdb) FAIL: gdb.fortran/dynamic.exp: p varz ... --=20 You are receiving this mail because: You are on the CC list for the bug.=