From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C261B3857437; Wed, 24 Jan 2024 11:11:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C261B3857437 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706094709; bh=EjhEm8gja2nFsb5t319fZGIyOdlW9iF/lFDTIqYDMH4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cwX+B94WGZixlfu6lXFtsUkq1WKBEHTiyr6uwp3cRqq+oLSEB94oSK/EjanQuDEy9 xpExV5lq40H8/bMr94bY3vdX46vkZ0tLr9OkF3RlNsJP2DAJyeVucVfREaLPxlxBIC aNg3ho4YS6jNhIKi8Hr4RiwCNz4tX/HTvDA6AHTQ= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug fortran/31282] [gdb/fortran] logical type doesn't match documentation of TYPE_CODE_BOOL Date: Wed, 24 Jan 2024 11:11:47 +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: 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: 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=3D31282 --- Comment #2 from Tom de Vries --- Hmm, here: ... /* The set of Fortran booleans. These are matched case insensitively. */ static const struct f77_boolean_val boolean_values[] =3D { { ".true.", 1 }, { ".false.", 0 } }; ... we assume 0/1. Not great when debugging an ifort-compiled program (FWIW, this is gdb.fortran/logical.f90): ... (gdb) p l $9 =3D .TRUE. (gdb) p l =3D=3D .TRUE. $10 =3D .FALSE. (gdb) p /x l $11 =3D 0xffffffff (gdb) p /x .TRUE. $12 =3D 0x1 ... OK, so is there any indication in the dwarf to show that .TRUE. =3D=3D -1? = Let's see: ... <1><153>: Abbrev Number: 5 (DW_TAG_base_type) <154> DW_AT_byte_size : 4 <155> DW_AT_encoding : 2 (boolean) <156> DW_AT_name : (indirect string, offset: 0x2a5): LOGICAL(4) ... Nope, that's the same as gnu fortran: ... <1><1a3>: Abbrev Number: 4 (DW_TAG_base_type) <1a4> DW_AT_byte_size : 4 <1a5> DW_AT_encoding : 2 (boolean) <1a6> DW_AT_name : (indirect string, offset: 0x1d3): logical(kind=3D4) ... --=20 You are receiving this mail because: You are on the CC list for the bug.=