From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by sourceware.org (Postfix) with ESMTPS id E5D87387090F for ; Fri, 12 Mar 2021 09:36:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E5D87387090F IronPort-SDR: YShtSEXWbskROqqVePGqPxRvVJpAekOeKQ33KC3wHga7Pb1w2M2YKRnD/C9hQ0tm9JZNEIvlOg Q3os8axMrz8Q== X-IronPort-AV: E=McAfee;i="6000,8403,9920"; a="188851413" X-IronPort-AV: E=Sophos;i="5.81,243,1610438400"; d="scan'208";a="188851413" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2021 01:36:20 -0800 IronPort-SDR: ckaOHfDyJ8QuMp86iHHR2PkvKLk3qM+AsyyY8jbzQq5RPiW5kHww7aObqYvreuwCFxAvZFhkJN tvdNR++Clttg== X-IronPort-AV: E=Sophos;i="5.81,243,1610438400"; d="scan'208";a="404365832" Received: from mulvlfelix.iul.intel.com (HELO localhost) ([172.28.48.31]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2021 01:36:18 -0800 From: Felix Willgerodt To: gdb-patches@sourceware.org, felix.willgerodt@intel.com Subject: [PATCH] gdb/fortran: Fix quad floating-point type for Intel compilers. Date: Fri, 12 Mar 2021 10:35:21 +0100 Message-Id: <20210312093521.1026996-1-felix.willgerodt@intel.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2021 09:36:27 -0000 Intel Fortran compilers emit the following DWARF for gdb.fortran/complex.c: 0x00000071: DW_TAG_base_type DW_AT_name ("COMPLEX*32") DW_AT_encoding (DW_ATE_complex_float) DW_AT_byte_size (0x20) 0x00000078: DW_TAG_base_type DW_AT_name ("REAL*16") DW_AT_encoding (DW_ATE_float) DW_AT_byte_size (0x10) This results in GDB not reading the right values, as it wrongly assumes the default floatformat "floatformat_i387_ext" instead of "floatformat_ia64_quad_little". gdb/ChangeLog: 2021-03-08 Felix Willgerodt * i386-tdep.c (i386_floatformat_for_type): Add COMPLEX*32 and REAL*16. --- gdb/i386-tdep.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 4f8da924073..2649fad08f2 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -8162,9 +8162,12 @@ i386_floatformat_for_type (struct gdbarch *gdbarch, || strcmp (name, "_Float128") == 0 || strcmp (name, "complex _Float128") == 0 || strcmp (name, "complex(kind=16)") == 0 + || strcmp (name, "complex*32") == 0 + || strcmp (name, "COMPLEX*32") == 0 || strcmp (name, "quad complex") == 0 || strcmp (name, "real(kind=16)") == 0 - || strcmp (name, "real*16") == 0) + || strcmp (name, "real*16") == 0 + || strcmp (name, "REAL*16") == 0) return floatformats_ia64_quad; return default_floatformat_for_type (gdbarch, name, len); -- 2.25.4 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928