From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 15FE3389850D; Fri, 19 Jun 2020 14:11:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15FE3389850D From: "mani.e at protonmail dot com" To: gdb-prs@sourceware.org Subject: [Bug fortran/26139] New: Cannot access allocatable array/pointer component of derived-type dummy argument Date: Fri, 19 Jun 2020 14:11:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: fortran X-Bugzilla-Version: 9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: mani.e at protonmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Fri, 19 Jun 2020 14:11:48 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26139 Bug ID: 26139 Summary: Cannot access allocatable array/pointer component of derived-type dummy argument Product: gdb Version: 9.2 Status: UNCONFIRMED Severity: critical Priority: P2 Component: fortran Assignee: unassigned at sourceware dot org Reporter: mani.e at protonmail dot com Target Milestone: --- I have encountered a problem while trying to debug Fortran code using gdb 8= .1 and after installing gdb 9.2, it still persists. The bug is closely related= to #23051. The following MWE helps demonstrate the issue: ```Fortran module test_module type test_type integer a real, allocatable :: b(:, :) contains procedure :: test_proc end type contains subroutine test_proc(this) class(test_type), intent(inout) :: this allocate(this%b(3, 2)) this%b =3D 0 end subroutine end module program test use test_module implicit none type(test_type) :: t call t%test_proc() end program test ``` When trying to access the allocated component of the dummy argument ```this= ``` in gdb, the following error occurs: Breakpoint 1, test_module::test_proc (this=3D...) at test.f90:13 13 this%b =3D 0 (gdb) print this $1 =3D ( _data =3D 0x8202060 , _vptr =3D 0x8201d40 <__test_module_MOD___vtab_test_module_Test_type> ) (gdb) print this%_data%a $2 =3D 0 (gdb) print this%_data%b ../../gdb/value.c:2988: internal-error: value* value_primitive_field(value*, LONGEST, int, type*): Assertion `PROP_CONST =3D=3D TYPE_DATA_LOCATION_KIND = (type)' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) Accessing simple scalar components like ```a``` is not an issue. I could wo= rk around this issue by hand (which is cumbersome), but I need gdb to be integrated with GUI tools. --=20 You are receiving this mail because: You are on the CC list for the bug.=