From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 302CB3896C30; Mon, 5 Dec 2022 19:01:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 302CB3896C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670266913; bh=V/6/WcMyY2xk/zbK9whD8tFeCrcRCeHDb83UHsncX0Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DvhqHJZrWXAYoXEqU2mqbhU0ygGpc+zBRnOuCFFIURzESVcXZQLEnBnU+6GDGYCLo CA4zpiSQcn6o9QUz9uclIqoH4QTQORtt2ny+o1Pax38jobydD0zSdkp+T6DwtauqIS Tf7iU7rirLnk+w56IkDvSR6in+0Uut7oKfy8PBXY= From: "emr-gnu at hev dot psu.edu" To: gdb-prs@sourceware.org Subject: [Bug fortran/29842] Debugging variables with ALLOCATABLE attribute fails to read variable properties correctly Date: Mon, 05 Dec 2022 19:01:52 +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: emr-gnu at hev dot psu.edu 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: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29842 --- Comment #1 from Eric Reischer --- Additional information -- for the following variable definition, here is how various compilers encode the DWARF-2 info: INTEGER*4, ALLOCATABLE :: I(:) ALLOCATE( I(30) ) ---------------- ifort 2021.4.0 ---------------- < 2><0x0000004d> DW_TAG_variable DW_AT_decl_line 0x00000003 DW_AT_decl_file 0x00000001 minimal.for DW_AT_name i DW_AT_type <0x00000061> DW_AT_location len 0x0009: 03a0836b0000000000: DW_OP_addr 0x006b83a0 < 1><0x00000061> DW_TAG_array_type DW_AT_ordering DW_ORD_col_major DW_AT_type <0x00000093> DW_AT_data_location len 0x0002: 9706: DW_OP_push_object_address DW_OP_deref DW_AT_allocated len 0x000b: 97101822060c010000001a: DW_OP_push_object_address DW_OP_constu 24 DW_OP_plus DW_OP_deref DW_OP_const4u 1 DW_OP_and < 2><0x00000076> DW_TAG_subrange_type DW_AT_byte_stride len 0x0005: 9710382206: DW_OP_push_object_address DW_OP_constu 56 DW_OP_plus DW_OP_deref DW_AT_upper_bound len 0x000e: 971040220697103022062210011c: DW_OP_push_object_address DW_OP_constu 64 DW_OP_plus DW_OP_deref DW_OP_push_object_address DW_OP_constu 48 DW_OP_plus DW_OP_deref DW_OP_plus DW_OP_constu 1 DW_OP_minus DW_AT_lower_bound len 0x0005: 9710402206: DW_OP_push_object_address DW_OP_constu 64 DW_OP_plus DW_OP_deref < 1><0x00000093> DW_TAG_base_type DW_AT_byte_size 0x00000004 DW_AT_encoding DW_ATE_signed DW_AT_name INTEGER(4) ---------------- ifort 2021.4.0 ---------------- ---------------- ifx 2021.4.0 ---------------- < 2><0x00000043> DW_TAG_variable DW_AT_name i DW_AT_type <0x0000005d> DW_AT_decl_file 0x00000001 minimal.for DW_AT_decl_line 0x00000003 DW_AT_location len 0x0009: 0390b36b0000000000: DW_OP_addr 0x006bb390 DW_AT_linkage_name test_$I < 1><0x0000005d> DW_TAG_array_type DW_AT_data_location len 0x0002: 9706: DW_OP_push_object_address DW_OP_deref DW_AT_allocated len 0x0006: 97231806311a: DW_OP_push_object_address DW_OP_plus_uconst 24 DW_OP_deref DW_OP_lit1 DW_OP= _and DW_AT_type <0x00000088> < 2><0x0000006c> DW_TAG_subrange_type DW_AT_type <0x0000008f> DW_AT_lower_bound len 0x0004: 97234006: DW_OP_push_object_address DW_OP_plus_uconst 64 DW_OP_deref DW_AT_upper_bound len 0x000b: 972340069723300622311c: DW_OP_push_object_address DW_OP_plus_uconst 64 DW_OP_deref DW_OP_push_object_address DW_OP_plus_uconst 48 DW_OP_deref DW_OP_plus DW_OP_lit1 DW_OP_minus DW_AT_byte_stride len 0x0004: 97233806: DW_OP_push_object_address DW_OP_plus_uconst 56 DW_OP_deref < 1><0x00000088> DW_TAG_base_type DW_AT_name INTEGER*4 DW_AT_encoding DW_ATE_signed DW_AT_byte_size 0x00000004 < 1><0x0000008f> DW_TAG_base_type DW_AT_name __ARRAY_SIZE_TYPE__ DW_AT_byte_size 0x00000008 DW_AT_encoding DW_ATE_unsigned ---------------- ifx 2021.4.0 ---------------- ---------------- gfortran 7.5.0 ---------------- < 1><0x0000007b> DW_TAG_base_type DW_AT_byte_size 0x00000004 DW_AT_encoding DW_ATE_signed DW_AT_name integer(kind=3D4) < 1><0x00000087> DW_TAG_pointer_type DW_AT_byte_size 0x00000008 DW_AT_type <0x0000008d> < 2><0x000000b2> DW_TAG_variable DW_AT_name i DW_AT_decl_file 0x00000001 minimal.for DW_AT_decl_line 0x00000003 DW_AT_type <0x000000d0> DW_AT_location len 0x0002: 9140: DW_OP_fbreg -64 < 1><0x000000d0> DW_TAG_array_type DW_AT_data_location len 0x0002: 9706: DW_OP_push_object_address DW_OP_deref DW_AT_allocated len 0x0004: 9706302e: DW_OP_push_object_address DW_OP_deref DW_OP_lit0 DW_OP_ne DW_AT_type <0x0000007b> < 2><0x000000dd> DW_TAG_subrange_type DW_AT_lower_bound len 0x0004: 97232006: DW_OP_push_object_address DW_OP_plus_uconst 32 DW_OP_deref DW_AT_upper_bound len 0x0004: 97232806: DW_OP_push_object_address DW_OP_plus_uconst 40 DW_OP_deref DW_AT_byte_stride len 0x0006: 97231806341= e: DW_OP_push_object_address DW_OP_plus_uconst 24 DW_OP_deref DW_OP_lit4 DW_OP= _mul ---------------- gfortran 7.5.0 ---------------- --=20 You are receiving this mail because: You are on the CC list for the bug.=