public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Felix Willgerodt <felix.willgerodt@intel.com>
To: gdb-patches@sourceware.org
Cc: Felix Willgerodt <felix.willgerodt@intel.com>
Subject: [PATCH 1/1] gdb, fortran: Fix quad floating-point type for ifort compiler.
Date: Tue, 14 Feb 2023 12:00:49 +0100	[thread overview]
Message-ID: <20230214110049.649769-1-felix.willgerodt@intel.com> (raw)

I fixed this a while ago for ifx, one of the two Intel compilers, in
8d624a9d8050ca96e154215c7858ac5c2d8b0b19.

Apparently I missed that the older ifort Intel compiler actually emits
slightly different debug info again:

0x0000007a:   DW_TAG_base_type
                DW_AT_byte_size	(0x20)
                DW_AT_encoding	(DW_ATE_complex_float)
                DW_AT_name	("COMPLEX(16)")

0x00000081:   DW_TAG_base_type
                DW_AT_byte_size	(0x10)
                DW_AT_encoding	(DW_ATE_float)
                DW_AT_name	("REAL(16)")

This fixes two failures in gdb.fortran/complex.exp with ifort.
---
 gdb/i386-tdep.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index da4950ac259..acf22dba98d 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -8238,12 +8238,14 @@ 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(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
+	|| strcmp (name, "REAL(16)") == 0)
       return floatformats_ieee_quad;
 
   return default_floatformat_for_type (gdbarch, name, len);
-- 
2.39.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://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


             reply	other threads:[~2023-02-14 11:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 11:00 Felix Willgerodt [this message]
2023-02-14 15:14 ` Tom Tromey
2023-02-15  9:05   ` Willgerodt, Felix
2023-02-15 16:52     ` Tom Tromey
2023-02-20  9:17       ` Willgerodt, Felix
2023-02-24 14:11         ` Tom Tromey
2023-02-28 10:21           ` Willgerodt, Felix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230214110049.649769-1-felix.willgerodt@intel.com \
    --to=felix.willgerodt@intel.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).