From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A39F385842C; Mon, 9 Aug 2021 09:27:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A39F385842C From: "abdul.b.ijaz at intel dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/101826] New: GFORTRAN: Debug info missing DW_TAG_string_type for array of variable length string Date: Mon, 09 Aug 2021 09:27:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: abdul.b.ijaz at intel dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2021 09:27:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101826 Bug ID: 101826 Summary: GFORTRAN: Debug info missing DW_TAG_string_type for array of variable length string Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: abdul.b.ijaz at intel dot com Target Milestone: --- Using GFortran 11.1.0 or older versions it is seen that dwarf debug info do= es not contain DW_TAG_string_type for array of variable length strings like sh= own in reproducer below and instead it contains DW_TAG_structure_type. As per d= warf spec there should have been DW_TAG_string_type for string type object. Reproducer program: subroutine str_arr (arr1) character (len=3D*):: arr1(:) print *, arr1 end subroutine str_arr program main interface subroutine str_arr (arr1) character (len=3D*):: arr1 (:) end subroutine str_arr end interface character (len=3D10) :: arr (5) arr =3D 'fortranarr' call str_arr (arr) end program main Dwarf info: <1>: Abbrev Number: 14 (DW_TAG_subprogram) DW_AT_external : 1 DW_AT_name : (indirect string, offset: 0x12): str_arr DW_AT_decl_file : 1 DW_AT_decl_line : 1 DW_AT_decl_column : 18 DW_AT_linkage_name: (indirect string, offset: 0x4b): str_arr_ DW_AT_low_pc : 0x7d5 DW_AT_high_pc : 0x19f DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_c= fa) DW_AT_GNU_all_tail_call_sites: 1 DW_AT_sibling : <0x12c> <2><100>: Abbrev Number: 15 (DW_TAG_formal_parameter) <101> DW_AT_name : (indirect string, offset: 0x1): arr1 <105> DW_AT_type : <0x12c> <109> DW_AT_artificial : 1 <109> DW_AT_location : 4 byte block: 91 f8 7a 6 (DW_OP_fbre= g: -648; DW_OP_deref) <2><10e>: Abbrev Number: 15 (DW_TAG_formal_parameter) <10f> DW_AT_name : (indirect string, offset: 0x0): _arr1 <113> DW_AT_type : <0x35> <117> DW_AT_artificial : 1 <117> DW_AT_location : 3 byte block: 91 f0 7a (DW_OP_fbreg: -656) <2><11b>: Abbrev Number: 16 (DW_TAG_variable) <11c> DW_AT_type : <0x2e> <120> DW_AT_artificial : 1 <120> DW_AT_location : 2 byte block: 91 50 (DW_OP_fbreg: -48) <2><123>: Abbrev Number: 16 (DW_TAG_variable) <124> DW_AT_type : <0x14d> <128> DW_AT_artificial : 1 <128> DW_AT_location : 2 byte block: 91 58 (DW_OP_fbreg: -40) <2><12b>: Abbrev Number: 0 <1><12c>: Abbrev Number: 17 (DW_TAG_structure_type) <12d> DW_AT_declaration : 1=