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/26155] p cos(alat(j)) command make gdb Aborted (core dumped) Date: Wed, 03 Feb 2021 12:49:53 +0000 [thread overview] Message-ID: <bug-26155-4717-k1dSCLkqRn@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26155-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26155 --- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> --- Tentative patch: ... diff --git a/gdb/f-lang.c b/gdb/f-lang.c index bd6ef20f9b1..3b402cf1822 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -934,6 +934,8 @@ evaluate_subexp_f (struct type *expect_type, struct expression *ex p, Infinite recursion ensues. */ if (code == TYPE_CODE_PTR || code == TYPE_CODE_FUNC) { + if (tem - 1 >= value_type (arg1)->num_fields ()) + error (_("Cannot find argument type")); bool is_artificial = TYPE_FIELD_ARTIFICIAL (value_type (arg1), tem - 1); argvec[tem] = fortran_argument_convert (argvec[tem], ... with which we have: ... $ gdb -batch a.out -ex start -ex "p cos (10)" Temporary breakpoint 1 at 0x400b3d: file test.F90, line 31. Temporary breakpoint 1, MAIN__ () at test.F90:31 31 DO i = 1, n Cannot find argument type ... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-02-03 12:49 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-23 1:26 [Bug fortran/26155] New: " yansendao at huawei dot com 2021-02-03 12:40 ` [Bug fortran/26155] " vries at gcc dot gnu.org 2021-02-03 12:49 ` vries at gcc dot gnu.org [this message] 2021-02-25 10:33 ` cvs-commit at gcc dot gnu.org 2021-02-25 10:43 ` andrew.burgess at embecosm dot com 2021-02-25 11:58 ` vries at gcc dot gnu.org 2021-02-25 12:00 ` vries at gcc dot gnu.org 2021-02-25 14:45 ` tromey at sourceware dot 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-26155-4717-k1dSCLkqRn@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: linkBe 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).