public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb, fortran: Fix quad floating-point type for ifort compiler.
@ 2023-02-15  9:03 Felix Willgerodt
  0 siblings, 0 replies; only message in thread
From: Felix Willgerodt @ 2023-02-15  9:03 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ecbc5c4f9059dd483cf8b0705cbd4e2e9606aad5

commit ecbc5c4f9059dd483cf8b0705cbd4e2e9606aad5
Author: Felix Willgerodt <felix.willgerodt@intel.com>
Date:   Mon Feb 13 11:02:23 2023 +0100

    gdb, fortran: Fix quad floating-point type for ifort compiler.
    
    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.
    
    Approved-By: Tom Tromey <tom@tromey.com>

Diff:
---
 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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-15  9:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15  9:03 [binutils-gdb] gdb, fortran: Fix quad floating-point type for ifort compiler Felix Willgerodt

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).