public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/104194] No way to distinguish IEEE and IBM long double in debug info Date: Wed, 26 Jan 2022 18:43:49 +0000 [thread overview] Message-ID: <bug-104194-4-Z6q9z5OHTh@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104194-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104194 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:866d73019bd4d1804f7e09409322e6605b81780b commit r12-6882-g866d73019bd4d1804f7e09409322e6605b81780b Author: Jakub Jelinek <jakub@redhat.com> Date: Wed Jan 26 19:42:31 2022 +0100 dwarf2out: For ppc64le IEEE quad long double, emit DW_TAG_typedef to _Float128 [PR104194] On Mon, Jan 24, 2022 at 11:26:27PM +0100, Jakub Jelinek via Gcc-patches wrote: > Yet another short term solution might be not use DW_TAG_base_type > for the IEEE quad long double, but instead pretend it is a DW_TAG_typedef > with DW_AT_name "long double" to __float128 DW_TAG_base_type. > I bet gdb would even handle it without any changes, but of course, it would > be larger than the other proposed changes. Here it is implemented. Testcases I've played with are e.g.: __ibm128 a; long double b; _Complex long double c; static __attribute__((noinline)) int foo (long double d) { long double e = d + 1.0L; return 0; } int main () { a = 1.0; b = 2.0; c = 5.0 + 6.0i; return foo (7.0L); } and real(kind=16) :: a complex(kind=16) :: b a = 1.0 b = 2.0 end Printing the values of the variables works well, p &b or p &c shows pointer to the correct type, just ptype b or ptype c prints _Float128 instead of long double or complex _Float128 instead of complex long double. Even worse in fortran where obviously _Float128 or complex _Float128 aren't valid types, but as GDB knows them by name, it is just ptype that is weird. 2022-01-26 Jakub Jelinek <jakub@redhat.com> PR debug/104194 * dwarf2out.cc (long_double_as_float128): New function. (modified_type_die): For powerpc64le IEEE 754 quad long double and complex long double emit those as DW_TAG_typedef to _Float128 or complex _Float128 base type.
next prev parent reply other threads:[~2022-01-26 18:43 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-23 15:48 [Bug debug/104194] New: " jakub at gcc dot gnu.org 2022-01-23 18:51 ` [Bug debug/104194] " segher at gcc dot gnu.org 2022-01-24 12:37 ` jakub at gcc dot gnu.org 2022-01-24 17:46 ` jakub at gcc dot gnu.org 2022-01-24 18:55 ` jakub at gcc dot gnu.org 2022-01-24 21:48 ` segher at gcc dot gnu.org 2022-01-26 18:43 ` cvs-commit at gcc dot gnu.org [this message] 2022-01-26 18:46 ` jakub at gcc dot gnu.org 2022-07-25 15:08 ` uweigand at gcc dot gnu.org
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=bug-104194-4-Z6q9z5OHTh@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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: linkBe 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).