From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3BE103939C1F; Wed, 3 Feb 2021 12:40:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3BE103939C1F From: "vries at gcc dot gnu.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:40:38 +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: 10.1 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: everconfirmed cc cf_reconfirmed_on bug_status 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, 03 Feb 2021 12:40:38 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26155 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |andrew.burgess at embecosm= dot com | |, vries at gcc dot gnu.org Last reconfirmed| |2021-02-03 Status|UNCONFIRMED |NEW --- Comment #1 from Tom de Vries --- Reproduced: ... $ gfortran test.F90 -g -O0 $ 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 =3D 1, n Aborted (core dumped) ... In more detail: ... Temporary breakpoint 1, MAIN__ () at test.F90:31 31 DO i =3D 1, n Thread 1 "gdb" received signal SIGSEGV, Segmentation fault. 0x00000000006ab78e in evaluate_subexp_f (expect_type=3D0x0, exp=3D0x2067bf0, pos=3D0x7fffffffd3bc,=20 noside=3DEVAL_NORMAL) at gdb/f-lang.c:938 938 =3D TYPE_FIELD_ARTIFICIAL (value_type (arg1),= tem - 1); ... So tem is: ... (gdb) p tem $2 =3D 1 ... and value_type (arg1) is : ... (gdb) p value_type (arg1) $1 =3D (type *) 0x21cc140 (gdb) call recursive_dump_type ($1, 0) type node 0x21cc140 name '' (0xe5f160) code 0x7 (TYPE_CODE_FUNC) length 1 objfile 0x224c490 target_type 0x0 pointer_type 0x0 reference_type 0x0 type_chain 0x21cc140 instance_flags 0x0 flags nfields 0 0x0 calling_convention 0 ... So, we do TYPE_FIELD_ARTIFICIAL($1, 0). The macro TYPE_FIELD_ARTIFICIAL is defined like this: ... #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL((thistype)->fie= ld (n)) ... so we try to access field 0 of type $1, but the type has no fields (see nfi= elds in the recursive type dump). --=20 You are receiving this mail because: You are on the CC list for the bug.=